diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/utils/Utils.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/utils/Utils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/cuchaz/enigma/utils/Utils.java b/src/main/java/cuchaz/enigma/utils/Utils.java index 3c3e68a..17f6fb8 100644 --- a/src/main/java/cuchaz/enigma/utils/Utils.java +++ b/src/main/java/cuchaz/enigma/utils/Utils.java | |||
| @@ -101,7 +101,7 @@ public class Utils { | |||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | public static void delete(Path path) throws IOException { | 103 | public static void delete(Path path) throws IOException { |
| 104 | if (path.toFile().exists()) { | 104 | if (Files.exists(path)) { |
| 105 | for (Path p : Files.walk(path).sorted(Comparator.reverseOrder()).collect(Collectors.toList())) { | 105 | for (Path p : Files.walk(path).sorted(Comparator.reverseOrder()).collect(Collectors.toList())) { |
| 106 | Files.delete(p); | 106 | Files.delete(p); |
| 107 | } | 107 | } |