From 9c94e6f46b20066601d21371e3aae61a58564953 Mon Sep 17 00:00:00 2001 From: Dietrich Friday Date: Sun, 22 Oct 2023 23:45:04 +0900 Subject: [PATCH] `.DS_Store` files on macOS are spelled with capital Ds and Ss (#729) * `.DS_Store` files on macOS are spelled with capital Ds and Ss * Doh, missed a second occurrence of lower-cased '.ds_store' * "Thumbs.db" is, I believe, always has a capital 'T'. --- .../mods/kubejs/script/data/GeneratedResourcePack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 939531a73..5081c10a0 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 @@ -39,7 +39,7 @@ public static void scanForInvalidFiles(String pathName, Path path) throws IOExce try { var fileName = p.getFileName().toString(); - if (fileName.endsWith(".zip") || fileName.equals(".ds_store") || fileName.equals("thumbs.db") || fileName.equals("desktop.ini")) { + if (fileName.endsWith(".zip") || fileName.equals(".DS_Store") || fileName.equals("Thumbs.db") || fileName.equals("desktop.ini")) { return; } else if (Files.isHidden(path)) { ConsoleJS.STARTUP.error("Invisible file found: " + pathName + path.relativize(p).toString().replace('\\', '/')); @@ -103,7 +103,7 @@ public Map getGenerated() { int sindex = pathStr.lastIndexOf('/'); var fileName = sindex == -1 ? pathStr : pathStr.substring(sindex + 1); - if (fileName.endsWith(".zip") || fileName.equals(".ds_store") || fileName.equals("thumbs.db") || fileName.equals("desktop.ini") || Files.isHidden(path)) { + if (fileName.endsWith(".zip") || fileName.equals(".DS_Store") || fileName.equals("Thumbs.db") || fileName.equals("desktop.ini") || Files.isHidden(path)) { continue; }