You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
minizip.exe: zip archive with empty directory? #257
supposedly "new" and "save" are empty directories not a file.
this package.zip also impossible to extract due it is illegal for Windows to have directory and file of the same name "template"
I have changed it so it shows a slash at the end if it is a directory. If you still have problems can you explain how you are seeing those directories as files and also attach your zip. Thanks.
Opening the zip with hex editor it doesn't have slash at the end in the zip index. So there is mis-detection of directory? 7zip created zip does have slash
Activity
Added support for directory entries in minizip. #257
nmoinvaz commentedon May 1, 2018
I added support for this into the dev branch.
tumagonx commentedon May 2, 2018
I try:
minizip -1 -i ..\package.zip *but the empty folders now added as normal zero-byte file not directory?
am I missing something?
nmoinvaz commentedon May 2, 2018
The directory file attribute has been set for those entries in the zip file. If you are using
-lI have added attributes column so you can see it.tumagonx commentedon May 2, 2018
if I list it:
minizip -l ..\package.zipI get:
supposedly "new" and "save" are empty directories not a file.
this package.zip also impossible to extract due it is illegal for Windows to have directory and file of the same name "template"
please reopen.
nmoinvaz commentedon May 2, 2018
I don't think you are using the latest version from the dev branch. It has an attributes column.
tumagonx commentedon May 2, 2018
I did use dev branch just missed the printout commit (83bce6e)
The problem still there:
Fixed print out of directories. #257
Fixed directory compression method.
nmoinvaz commentedon May 2, 2018
I have changed it so it shows a slash at the end if it is a directory. If you still have problems can you explain how you are seeing those directories as files and also attach your zip. Thanks.
tumagonx commentedon May 2, 2018
It is still treated as file, here the zip file (I replaced sensitive data with dummy text)
package.zip
Googling around I notice same problem also happen to older .NET sharpziplib
https://stackoverflow.com/questions/18363187/how-do-you-add-a-folder-to-a-zip-archive-with-icsharpcode-sharpziplib
https://sourceforge.net/p/sevenzip/discussion/45798/thread/b246352d/
tumagonx commentedon May 2, 2018
Opening the zip with hex editor it doesn't have slash at the end in the zip index. So there is mis-detection of directory? 7zip created zip does have slash
Append slash to directories for compatibility. #257
nmoinvaz commentedon May 2, 2018
Okay I have appended a slash to the filename for directories.
tumagonx commentedon May 2, 2018
cool, works now!
tested with miniz 1.1.5 too.