Skip to content

Commit 08be87d

Browse files
authored
Merge pull request #503 from roosipuu/fix
fixed windows paths
2 parents a8ddc64 + 06aba4d commit 08be87d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/methods/methods.test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ describe("adm-zip.js - methods handling local files", () => {
254254

255255
it("zip.addLocalFolder(destination, '', filter)", () => {
256256
const zip = new Zip();
257-
const filter = (str) => str.slice(-1) === "/";
257+
const filter = function (str) {
258+
return str.slice(-1) === pth.sep;
259+
};
258260
zip.addLocalFolder(destination, "", filter);
259261
zip.toBuffer();
260262

@@ -463,7 +465,9 @@ describe("adm-zip.js - methods handling local files", () => {
463465

464466
it("zip.addLocalFolderAsync2({localPath, filter}, callback)", (done) => {
465467
const zip = new Zip();
466-
const filter = (str) => str.slice(-1) === "/";
468+
const filter = function (str) {
469+
return str.slice(-1) === pth.sep;
470+
};
467471
zip.addLocalFolderAsync2({ localPath: destination, filter }, (error) => {
468472
if (error) done(false);
469473

0 commit comments

Comments
 (0)