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
Windows: compressed zip folder has invalid format #196
Comments
Any luck with this? I'm having the same issue. |
Currently not. const fs = require('fs-extra');
const path = require('path');
// zip files created by this module are not extractable window default uncompress folder command
// see: https://github.com/archiverjs/node-archiver/issues/196
const archiver = require('archiver');
const exec = require('child_process').exec;
function createCli(dir, outFile) {
return new Promise((resolve, reject) => {
const relPath = path.relative(dir, outFile);
exec(`zip -r ${relPath} .`, {cwd: dir}, error => error ? reject(error) : resolve());
});
} let's ping @ctalkington directly =) |
All is good for me. It turns out the directory I was archiving had too many nested folders (thanks to Node). Once I excluded the node_modules directory the compressed file was valid. |
thanks for the ping, notifications on github never seem to work the way i want so I dont see alot of the initial reports. as far as im aware this should be working fine, i don't have a CI that runs mac so its a bit harder to make tests to confirm such. the paths being long could cause some issue for windows, i dont think built in explorer tool supports the extended paths feature of windows. |
+1 |
haven't personally been able to create this, if anyone encounters this still with v2.0.0 please open a new issue and provide as much detail and reproduction guidance as possible. |
I'm creating zip on Mac osx and it is uncompressed correctly on mac finder.
But when I try to uncompress it on Windows 7 using standard "Extract all..." from right click menu of zip folder, I'm getting error:
Using cmd unzip command works fine, using 7-zip also works fine.
What can be wrong?
The text was updated successfully, but these errors were encountered: