adm-zip icon indicating copy to clipboard operation
adm-zip copied to clipboard

Mac Archive Utility fails on zip with empty directories

Open filiphoeven opened this issue 6 months ago • 0 comments

When zipping a folder that contains empty folders using this code:

		const zipFile = fs.existsSync(filePath) ? new AdmZip(filePath) : new AdmZip();
		zipFile.addLocalFolder(folderPathToZip);
		zipFile.writeZip(filePath);

The ZIP file cannot be unzipped by Mac OS's "Archive Utility" app used by "Finder" to unzip ZIP files. It works command line using the "zip" command and it works with "The Unarchiver" app.

It fails with "Error 79 - Inappropriate file type or format" in "Archive Utility".

  • "adm-zip": "0.5.10"
  • Mac OS Sequioa 15.5 (24F74)
  • zip --version Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license. This is Zip 3.0 (July 5th 2008), by Info-ZIP, with modifications by Apple Inc. Compiled with gcc Apple LLVM 17.0.0 (clang-1700.0.13.5) [+internal-os] for Unix (Mac OS X) on Apr 18 2025.

filiphoeven avatar Jun 24 '25 07:06 filiphoeven