adm-zip
adm-zip copied to clipboard
unzip error ( using on meteor )
the code of compression:
zip = new AdmZip();
zip.addLocalFolder(folder);
zip.writeZip(zipPath);
it works, but when I decompress the zip file, the followed error occurred.
error: invalid compressed data to inflate
error: invalid compressed data to inflate
do I miss something ?
I can't decompress the archive in finder in Mac OS
By hand can't decompress , corrupted jpg and gif files
I've been running into this as well. Using 'zip -T foo.zip' on the command line will tell me which file in the archive is bad. Usually, I rebuild the archive with a the offending file renamed and it magically works. I have no idea what the actual problem is.
+1
I tried to write bad files directly through fs.writeFile and it works well, so why it's bad?
It's not bad files.The folder is gone,When unzip the file.This function add files in folder,but not include the folder itself.How to deal with it?
OK,zhe folder bug is fixed.
how did you fix it?@bengle