Skip to content

Mac Archive Utility fails on zip with empty directories #558

@filiphoeven

Description

@filiphoeven

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions