mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Check resolver input/output streams
This commit is contained in:
@@ -1917,6 +1917,8 @@ public class Helper {
|
||||
|
||||
static long copy(Context context, Uri uri, File file) throws IOException {
|
||||
try (InputStream is = context.getContentResolver().openInputStream(uri)) {
|
||||
if (is == null)
|
||||
throw new FileNotFoundException(uri.toString());
|
||||
try (OutputStream os = new FileOutputStream(file)) {
|
||||
return copy(is, os);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user