Skip to content

Commit

Permalink
cleanups: replaced File#delete with Files#delete
Browse files Browse the repository at this point in the history
  • Loading branch information
LostArtist authored and orpiske committed Oct 25, 2023
1 parent dbf7913 commit b7831e3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,9 @@ public static void recursivelyDeleteDirectory(File file) {
recursivelyDeleteDirectory(child);
}
}
boolean success = file.delete();
if (!success) {
try {
Files.delete(file.toPath());
} catch (IOException e) {
LOG.warn("Deletion of file: {} failed", file.getAbsolutePath());
}
}
Expand Down

0 comments on commit b7831e3

Please sign in to comment.