Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extractEntryTo doesn't gets Entry Folder #414

Closed
timheerwagen opened this issue Jan 22, 2022 · 0 comments
Closed

extractEntryTo doesn't gets Entry Folder #414

timheerwagen opened this issue Jan 22, 2022 · 0 comments

Comments

@timheerwagen
Copy link

timheerwagen commented Jan 22, 2022

I zip a folder from my backend with

if (fs.existsSync(`${dir}upload`)) {
      file.addLocalFolder(`${dir}upload`, "upload/");
    }

and download it in my frontend. The zip is exported correctly. Then i upload it again to test if i can unzip it again in my backend with

zip.extractEntryTo(
        "upload/",
        `${dir}/`,
        false,
        true
      );

And i get the error message "uncaughtException: Error: Entry doesn't exist" but if i extract a subfolder of upload for Example upload/product/ it works fine.

So this works:

zip.extractEntryTo(
        "upload/product/",
        `${dir}/`,
        false,
        true
      );

But this doesn't:

zip.extractEntryTo(
        "upload/",
        `${dir}/`,
        false,
        true
      );

I even tried when zip the file putting the upload folder in a subfolder for Example doing export/upload/
But this doesn't work either. There again only the subpath export/upload/product/ works.

When using extractAllTo it also works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants