mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
cbb90435b4
commit
bf672a4116
|
@ -310,6 +310,8 @@ public class ActivityEML extends ActivityBase {
|
|||
InputStream is;
|
||||
try {
|
||||
pfd = getContentResolver().openFileDescriptor(uri, "w");
|
||||
if (pfd == null)
|
||||
throw new FileNotFoundException(uri.toString());
|
||||
os = new FileOutputStream(pfd.getFileDescriptor());
|
||||
is = apart.part.getInputStream();
|
||||
|
||||
|
|
|
@ -360,6 +360,8 @@ public class FragmentBase extends Fragment {
|
|||
InputStream is = null;
|
||||
try {
|
||||
pfd = context.getContentResolver().openFileDescriptor(uri, "w");
|
||||
if (pfd == null)
|
||||
throw new FileNotFoundException(uri.toString());
|
||||
os = new FileOutputStream(pfd.getFileDescriptor());
|
||||
is = new FileInputStream(file);
|
||||
|
||||
|
@ -448,6 +450,8 @@ public class FragmentBase extends Fragment {
|
|||
InputStream is = null;
|
||||
try {
|
||||
pfd = context.getContentResolver().openFileDescriptor(document.getUri(), "w");
|
||||
if (pfd == null)
|
||||
throw new FileNotFoundException(name);
|
||||
os = new FileOutputStream(pfd.getFileDescriptor());
|
||||
is = new FileInputStream(file);
|
||||
|
||||
|
|
|
@ -5134,6 +5134,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
InputStream is = null;
|
||||
try {
|
||||
pfd = context.getContentResolver().openFileDescriptor(uri, "w");
|
||||
if (pfd == null)
|
||||
throw new FileNotFoundException(uri.toString());
|
||||
os = new FileOutputStream(pfd.getFileDescriptor());
|
||||
is = new FileInputStream(file);
|
||||
|
||||
|
|
Loading…
Reference in New Issue