Close file stream

pull/214/head
M66B 1 year ago
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…
Cancel
Save