mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-18 15:07:30 +01:00
Better error handling for downloads
This commit is contained in:
@@ -134,8 +134,9 @@ public final class DiskUtils {
|
||||
} catch (Exception e) {
|
||||
if (bufferedSink != null) {
|
||||
bufferedSink.close();
|
||||
writeFile.delete();
|
||||
}
|
||||
writeFile.delete();
|
||||
throw new IOException("Failed saving image");
|
||||
}
|
||||
|
||||
return writeFile;
|
||||
|
||||
Reference in New Issue
Block a user