[Closed] Internal zip vs empty directories

Started by ags, December 31, 2024, 13:32:47

Previous topic - Next topic

ags

Scenario
User creates a *.zip archive ("Internal zip" packing profile is selected) out of some files and directories; some of the directories are empty.

Observed behavior
MC does not pack the empty directories into the archive, they are ignored.
Also, if only empty directories are selected, MC creates an invalid zip file - no header, no nothing, 0 bytes.

Requested behavior
MC should respect the user's choice of data they want to pack. If there are empty directories selected for packing, they should be also found in the archive.

Mathias (Author)

According to Zip Spec, Entries with no data should not be packed. Many do it. Zip is like wild west. No one cares about the spec. But MC do not have that control.  It is up to the 3rd party lib that MC is using. I can check if they added support for it.

ags

Hello, thanks for the reply.
QuoteI can check if they added support for it.
Please check if you can.

Since other file managers do not have this problem, I guess the 3rd party library for zip archive that MC uses is not really that good or advanced?

Mathias (Author)

#3
It is quite advanced. It has support for most things. There are not many free c++ lib that support most zip features.
Problem is the Zip standard is OLD , it is from 1989. and been patched to support newer requirements. and not all zip/unzip code are following all the added specs completely. It is a real mess.

Jungle


Mathias (Author)

Quote from: Jungle on January 01, 2025, 20:28:54
7zip supports zip

That is different.
7Zip have there own format (7z) that is a totally different from zip. But the 7zip exe also include other formats like zip and more

ags

This functionality was added in 14.6.3056.
Thanks!