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 7781058ce..01c7dc1e7 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 @@ -59,9 +59,11 @@ public Map getGenerated() { } for (var path : Files.walk(dir).filter(Files::isRegularFile).filter(Files::isReadable).toList()) { - var pathStr = dir.relativize(path).toString().replace('\\', '/'); + var pathStr = dir.relativize(path).toString().replace('\\', '/').toLowerCase(); + int sindex = pathStr.lastIndexOf('/'); + var fileName = sindex == -1 ? pathStr : pathStr.substring(sindex + 1); - if (pathStr.endsWith(".zip")) { + if (fileName.endsWith(".zip") || fileName.equals(".ds_store") || fileName.equals("thumbs.db") || fileName.equals("desktop.ini") || Files.isHidden(path)) { continue; }