mirror of https://github.com/VERT-sh/VERT.git
fix: ignore macOS zip metadata entries
This commit is contained in:
parent
49821e51cb
commit
5f38a7b827
|
|
@ -41,9 +41,11 @@ export async function createZip(files: File[]): Promise<Uint8Array> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ignoreEntry(filename: string): boolean {
|
export function ignoreEntry(filename: string): boolean {
|
||||||
|
const segments = filename.split("/");
|
||||||
return (
|
return (
|
||||||
filename.startsWith(".") ||
|
filename.endsWith("/") ||
|
||||||
filename.includes("/__MACOSX/") ||
|
segments.some(
|
||||||
filename.endsWith("/")
|
(segment) => segment === "__MACOSX" || segment.startsWith("."),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue