mirror of https://github.com/M66B/FairEmail.git
Close file stream
This commit is contained in:
parent
8d706ab258
commit
cbcc467408
|
@ -574,7 +574,9 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|||
if (is == null)
|
||||
throw new FileNotFoundException(uri.toString());
|
||||
|
||||
Helper.copy(is, new FileOutputStream(file));
|
||||
try (FileOutputStream fos = new FileOutputStream(file)) {
|
||||
Helper.copy(is, fos);
|
||||
}
|
||||
|
||||
return FileProviderEx.getUri(this, BuildConfig.APPLICATION_ID, file);
|
||||
} catch (Throwable ex) {
|
||||
|
|
Loading…
Reference in New Issue