diff options
| author | 2016-07-03 00:08:04 +1000 | |
|---|---|---|
| committer | 2016-07-03 00:08:04 +1000 | |
| commit | 425bb7e0bff5207f9ce0fb15f1ebbac3a82d9e10 (patch) | |
| tree | 7c73b04824df1e239f1d46d4b01e413540ae8e1a | |
| parent | Started Gui Refactor (diff) | |
| download | enigma-425bb7e0bff5207f9ce0fb15f1ebbac3a82d9e10.tar.gz enigma-425bb7e0bff5207f9ce0fb15f1ebbac3a82d9e10.tar.xz enigma-425bb7e0bff5207f9ce0fb15f1ebbac3a82d9e10.zip | |
Fix #6, will now only load .json files
| -rw-r--r-- | src/main/java/cuchaz/enigma/mapping/MappingsReader.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/cuchaz/enigma/mapping/MappingsReader.java b/src/main/java/cuchaz/enigma/mapping/MappingsReader.java index b8f3ab2e..3b06e926 100644 --- a/src/main/java/cuchaz/enigma/mapping/MappingsReader.java +++ b/src/main/java/cuchaz/enigma/mapping/MappingsReader.java | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | ******************************************************************************/ | 10 | ******************************************************************************/ |
| 11 | package cuchaz.enigma.mapping; | 11 | package cuchaz.enigma.mapping; |
| 12 | 12 | ||
| 13 | import com.google.common.io.Files; | ||
| 13 | import com.google.gson.Gson; | 14 | import com.google.gson.Gson; |
| 14 | import com.google.gson.GsonBuilder; | 15 | import com.google.gson.GsonBuilder; |
| 15 | 16 | ||
| @@ -33,7 +34,7 @@ public class MappingsReader { | |||
| 33 | File[] fList = in.listFiles(); | 34 | File[] fList = in.listFiles(); |
| 34 | if (fList != null) { | 35 | if (fList != null) { |
| 35 | for (File file : fList) { | 36 | for (File file : fList) { |
| 36 | if (file.isFile()) { | 37 | if (file.isFile()&& Files.getFileExtension(file.getName()).equalsIgnoreCase("json")) { |
| 37 | readFile(mappings, new BufferedReader(new FileReader(file))); | 38 | readFile(mappings, new BufferedReader(new FileReader(file))); |
| 38 | } else if (file.isDirectory()) { | 39 | } else if (file.isDirectory()) { |
| 39 | readDirectory(mappings, file.getAbsoluteFile()); | 40 | readDirectory(mappings, file.getAbsoluteFile()); |