Skip to content

Commit

Permalink
.DS_Store files on macOS are spelled with capital Ds and Ss (#729)
Browse files Browse the repository at this point in the history
* `.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'.
  • Loading branch information
SubordinalBlue authored Oct 22, 2023
1 parent e32ad81 commit 9c94e6f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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('\\', '/'));
Expand Down Expand Up @@ -103,7 +103,7 @@ public Map<ResourceLocation, GeneratedData> 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;
}

Expand Down

0 comments on commit 9c94e6f

Please sign in to comment.