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

Zip fails if the destination is inside the folder to be zipped #39

Open
llorenspujol opened this issue Sep 8, 2020 · 1 comment
Open

Comments

@llorenspujol
Copy link

Issue

When zipping a folder and setting it's output to be in the same exact folder, the process never ends, gets indefinitely pending.

Example:

bestzip dist/app/app.zip dist/app/*

Output:

Writing dist/app/* to dist/app/app.zip... (never ends until the process is manually stopped)

Comments

Not big issue, but in my case is the output I desire. If it can be easily fixed by code or by showing some error it would be nice for future users.

If someone is here with the same issue just create the .zip outside the zipping folder and move it later on.

Environment

Windows 10,
Node 12.7.0

@nfriedly
Copy link
Owner

nfriedly commented Sep 8, 2020

Ah, yea, that running on forever is a problem. It should either error or at least warn and skip the destination file. What does the native zip command do? Do you want to send a PR to copy that behavior?

jobara added a commit to jobara/infusion that referenced this issue Apr 27, 2021
This is to get around a bug with bestzip where it hangs on windows if the archive is created in the same directory that is being archived.
nfriedly/node-bestzip#39
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