diff options
| author | 2016-08-12 19:59:54 +0200 | |
|---|---|---|
| committer | 2016-08-12 19:59:54 +0200 | |
| commit | 6032f55ede3c1b550cfd83b2f768926c992d9a98 (patch) | |
| tree | 75aa7866c2dd635d03798819ea0e691ec85f2247 /src/main/java/cuchaz/enigma/CommandMain.java | |
| parent | Implement Enigma directory format (#1) (diff) | |
| download | enigma-fork-6032f55ede3c1b550cfd83b2f768926c992d9a98.tar.gz enigma-fork-6032f55ede3c1b550cfd83b2f768926c992d9a98.tar.xz enigma-fork-6032f55ede3c1b550cfd83b2f768926c992d9a98.zip | |
Remoe JSON directory format support and clean up others things
Diffstat (limited to 'src/main/java/cuchaz/enigma/CommandMain.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/CommandMain.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/cuchaz/enigma/CommandMain.java b/src/main/java/cuchaz/enigma/CommandMain.java index 4e3f447..0678458 100644 --- a/src/main/java/cuchaz/enigma/CommandMain.java +++ b/src/main/java/cuchaz/enigma/CommandMain.java | |||
| @@ -15,7 +15,7 @@ import java.util.jar.JarFile; | |||
| 15 | 15 | ||
| 16 | import cuchaz.enigma.Deobfuscator.ProgressListener; | 16 | import cuchaz.enigma.Deobfuscator.ProgressListener; |
| 17 | import cuchaz.enigma.mapping.Mappings; | 17 | import cuchaz.enigma.mapping.Mappings; |
| 18 | import cuchaz.enigma.mapping.MappingsJsonReader; | 18 | import cuchaz.enigma.mapping.MappingsEnigmaReader; |
| 19 | 19 | ||
| 20 | public class CommandMain { | 20 | public class CommandMain { |
| 21 | 21 | ||
| @@ -47,7 +47,7 @@ public class CommandMain { | |||
| 47 | this.lastReportTime = now; | 47 | this.lastReportTime = now; |
| 48 | } | 48 | } |
| 49 | if (isLastUpdate) { | 49 | if (isLastUpdate) { |
| 50 | double elapsedSeconds = (now - this.startTime) / 1000; | 50 | double elapsedSeconds = (now - this.startTime) / 1000.0; |
| 51 | System.out.println(String.format("Finished in %.1f seconds", elapsedSeconds)); | 51 | System.out.println(String.format("Finished in %.1f seconds", elapsedSeconds)); |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| @@ -119,7 +119,7 @@ public class CommandMain { | |||
| 119 | Deobfuscator deobfuscator = new Deobfuscator(jar); | 119 | Deobfuscator deobfuscator = new Deobfuscator(jar); |
| 120 | if (fileMappings != null) { | 120 | if (fileMappings != null) { |
| 121 | System.out.println("Reading mappings..."); | 121 | System.out.println("Reading mappings..."); |
| 122 | Mappings mappings = new MappingsJsonReader().read(fileMappings); | 122 | Mappings mappings = new MappingsEnigmaReader().read(fileMappings); |
| 123 | deobfuscator.setMappings(mappings); | 123 | deobfuscator.setMappings(mappings); |
| 124 | } | 124 | } |
| 125 | return deobfuscator; | 125 | return deobfuscator; |
| @@ -143,7 +143,7 @@ public class CommandMain { | |||
| 143 | File file = new File(path).getAbsoluteFile(); | 143 | File file = new File(path).getAbsoluteFile(); |
| 144 | File dir = file.getParentFile(); | 144 | File dir = file.getParentFile(); |
| 145 | if (dir == null) { | 145 | if (dir == null) { |
| 146 | throw new IllegalArgumentException("Cannot write to folder: " + dir); | 146 | throw new IllegalArgumentException("Cannot write file: " + path); |
| 147 | } | 147 | } |
| 148 | // quick fix to avoid stupid stuff in Gradle code | 148 | // quick fix to avoid stupid stuff in Gradle code |
| 149 | if (!dir.isDirectory()) { | 149 | if (!dir.isDirectory()) { |