Author Topic: [Closed] Internal zip vs empty directories  (Read 2040 times)

ags

  • Junior Member
  • **
  • Posts: 40
    • View Profile
[Closed] Internal zip vs empty directories
« on: December 31, 2024, 13:32:47 »
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.
« Last Edit: January 08, 2025, 19:56:11 by ags »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4522
    • View Profile
    • Multi Commander
Re: Internal zip vs empty directories
« Reply #1 on: January 01, 2025, 13:31:00 »
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

  • Junior Member
  • **
  • Posts: 40
    • View Profile
Re: Internal zip vs empty directories
« Reply #2 on: January 01, 2025, 14:15:14 »
Hello, thanks for the reply.
Quote
I 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)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4522
    • View Profile
    • Multi Commander
Re: Internal zip vs empty directories
« Reply #3 on: January 01, 2025, 16:12:14 »
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.
« Last Edit: January 01, 2025, 16:19:15 by Mathias (Author) »

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 559
  • Old Skull
    • View Profile
Re: Internal zip vs empty directories
« Reply #4 on: January 01, 2025, 20:28:54 »
7zip supports zip

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4522
    • View Profile
    • Multi Commander
Re: Internal zip vs empty directories
« Reply #5 on: January 01, 2025, 20:33:11 »
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

  • Junior Member
  • **
  • Posts: 40
    • View Profile
Re: Internal zip vs empty directories
« Reply #6 on: January 08, 2025, 19:55:57 »
This functionality was added in 14.6.3056.
Thanks!