Skip to content

Commit

Permalink
#1648-startup-error-debug-folder
Browse files Browse the repository at this point in the history
fixes #1648
-added an exception for the debug folder when checking the map folders for scenario.luas, so it doesn't cause an error anymore
  • Loading branch information
FemtoZetta committed Mar 29, 2020
1 parent a28cbdf commit 579c212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/faforever/client/map/MapService.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public MapBean readMap(Path mapFolder) throws MapLoadException {

try (Stream<Path> mapFolderFilesStream = list(mapFolder)) {
Path scenarioLuaPath = mapFolderFilesStream
.filter(file -> file.getFileName().toString().endsWith("_scenario.lua"))
.filter(file -> !file.getParent().getName(file.getParent().getNameCount() - 1).equals("debug") && file.getFileName().toString().endsWith("_scenario.lua"))
.findFirst()
.orElseThrow(() -> new MapLoadException("Map folder does not contain a *_scenario.lua: " + mapFolder.toAbsolutePath()));

Expand Down

0 comments on commit 579c212

Please sign in to comment.