Fixed another Random Crash that happened when a file size is near 0

This commit is contained in:
bly 2023-01-05 00:23:04 +01:00
parent f32e5225cb
commit 553adbb9b6
2 changed files with 16 additions and 10 deletions

View file

@ -129,7 +129,10 @@ public class Main {
for (String md5: fileMap.keySet()) {
Main.fileMap.get(md5).remove(0);
for (Path file: Main.fileMap.get(md5)) {
bytes += file.toFile().length();
if (file != null) {
bytes += file.toFile().length();
}
}
allTheFilesWillBeDeleted.addAll(Main.fileMap.get(md5));