diff --git a/common/src/main/java/dev/latvian/mods/kubejs/script/data/GeneratedResourcePack.java b/common/src/main/java/dev/latvian/mods/kubejs/script/data/GeneratedResourcePack.java index 3e3f96a41..d47820cf4 100644 --- a/common/src/main/java/dev/latvian/mods/kubejs/script/data/GeneratedResourcePack.java +++ b/common/src/main/java/dev/latvian/mods/kubejs/script/data/GeneratedResourcePack.java @@ -41,10 +41,10 @@ public static void scanForInvalidFiles(String pathName, Path path) throws IOExce var fileNameLC = fileName.toLowerCase(); if (fileNameLC.endsWith(".zip") || fileNameLC.equals(".ds_store") || fileNameLC.equals("thumbs.db") || fileNameLC.equals("desktop.ini")) { - return; + continue; } else if (Files.isHidden(path)) { ConsoleJS.STARTUP.error("Invisible file found: " + pathName + path.relativize(p).toString().replace('\\', '/')); - return; + continue; } var chars = fileName.toCharArray(); @@ -52,10 +52,10 @@ public static void scanForInvalidFiles(String pathName, Path path) throws IOExce for (char c : chars) { if (c >= 'A' && c <= 'Z') { ConsoleJS.STARTUP.error("Invalid file name: Uppercase '" + c + "' in " + pathName + path.relativize(p).toString().replace('\\', '/')); - return; + break; } else if (c != '_' && c != '-' && (c < 'a' || c > 'z') && (c < '0' || c > '9') && c != '/' && c != '.') { ConsoleJS.STARTUP.error("Invalid file name: Invalid character '" + c + "' in " + pathName + path.relativize(p).toString().replace('\\', '/')); - return; + break; } } } catch (Exception ex) {