Update jar.ts

Yazl requires explicit handling of directories
This commit is contained in:
Waldemar Reusch 2023-04-05 17:41:23 +02:00 committed by GitHub
parent a02c38ac45
commit 309308db15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ export async function jarStream({ groupId, artifactId, version, asyncPathGenerat
for await (const entry of asyncPathGeneratorFn()) {
if ("buffer" in entry) {
zipFile.addBuffer(entry.buffer, entry.zipPath);
} else if ("fsPath" in entry) {
} else if ("fsPath" in entry && entry.fsPath.endsWith(sep)) {
zipFile.addFile(entry.fsPath, entry.zipPath);
}
}