diff options
| author | 2020-03-17 23:28:47 +0000 | |
|---|---|---|
| committer | 2020-03-17 23:28:47 +0000 | |
| commit | bfd7bfd739968af5b7bad17134783deedd424f1f (patch) | |
| tree | a9dc7906c88c1c8c40c98f0f97632cd7dd269e25 /src/main/java/cuchaz/enigma/utils | |
| parent | Fix documenting constructors (#201) (diff) | |
| download | enigma-fork-bfd7bfd739968af5b7bad17134783deedd424f1f.tar.gz enigma-fork-bfd7bfd739968af5b7bad17134783deedd424f1f.tar.xz enigma-fork-bfd7bfd739968af5b7bad17134783deedd424f1f.zip | |
Add support for reading/writing zipped mappings (#199)
* Add support to read/write Enigma mappings from ZIP
Takes any path which points to a ZIP as wanting to be read/written as a ZIP
Paths from an existing ZIP file system will be correctly handled as directories
* Fix deleting a path needing to be from the default file system
* Allow calling MapSpecializedMethodsCommand directly
* Fix indentation
* Missing static
Diffstat (limited to 'src/main/java/cuchaz/enigma/utils')
| -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 | } |