From 33f0804c539ebcbf3ad5607df14b6674bdbdcd52 Mon Sep 17 00:00:00 2001 From: rehlert Date: Fri, 12 Jun 2026 13:36:23 +0200 Subject: [PATCH] ignores mac special folders --- src/lib/zip-processing.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/lib/zip-processing.ts b/src/lib/zip-processing.ts index a8d8f80..d1e4768 100644 --- a/src/lib/zip-processing.ts +++ b/src/lib/zip-processing.ts @@ -58,6 +58,18 @@ const isImage = (path: string) => IMAGE_EXTENSIONS.has(getExtension(path)); const normalizeKey = (value: string) => value.replaceAll("\\", "/").toLowerCase().trim(); +const isMacMetadataEntry = (path: string) => { + const normalizedPath = normalizeKey(path); + const baseName = getBaseName(normalizedPath); + + return ( + normalizedPath.startsWith("__macosx/") || + normalizedPath.includes("/__macosx/") || + baseName === ".ds_store" || + baseName.startsWith("._") + ); +}; + const matchesElementName = (element: Element, requestedName: string) => { const requestedLocalName = requestedName.split(".").pop() ?? requestedName; @@ -186,6 +198,10 @@ export const extractZipArchive = async (file: File): Promise