Skip to content

Commit

Permalink
Merge pull request #503 from roosipuu/fix
Browse files Browse the repository at this point in the history
fixed windows paths
  • Loading branch information
5saviahv authored Jun 10, 2024
2 parents a8ddc64 + 06aba4d commit 08be87d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/methods/methods.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ describe("adm-zip.js - methods handling local files", () => {

it("zip.addLocalFolder(destination, '', filter)", () => {
const zip = new Zip();
const filter = (str) => str.slice(-1) === "/";
const filter = function (str) {
return str.slice(-1) === pth.sep;
};
zip.addLocalFolder(destination, "", filter);
zip.toBuffer();

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

it("zip.addLocalFolderAsync2({localPath, filter}, callback)", (done) => {
const zip = new Zip();
const filter = (str) => str.slice(-1) === "/";
const filter = function (str) {
return str.slice(-1) === pth.sep;
};
zip.addLocalFolderAsync2({ localPath: destination, filter }, (error) => {
if (error) done(false);

Expand Down

0 comments on commit 08be87d

Please sign in to comment.