mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
Prevent crash
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user