Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIP extraction containing backwards slashes \ in path names #1502

Open
strauhmanis opened this issue Aug 24, 2024 · 2 comments
Open

ZIP extraction containing backwards slashes \ in path names #1502

strauhmanis opened this issue Aug 24, 2024 · 2 comments
Assignees
Milestone

Comments

@strauhmanis
Copy link

Hello Jorge,

Configuration

  • Keka version: 1.4.3 (5464) MAS
  • macOS version: 14.6.1

Describe the bug

Keka incorrectly extracts paths / folders.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://github.com/Tranquiliti/CustomizableStarSystems/releases
  2. Download CustomizableStarSystems-v2.1.0.zip
  3. Extract the file with Keka
  4. See error

Expected behavior

Keka should extract the paths / folders in the same way as does macOS built-in Archive Utility.

Screenshots

See the attached screenshots of the archive extracted both with Keka and the Archive Utility.

Thank you
Keka
macOS14

@gingerbeardman
Copy link
Contributor

gingerbeardman commented Aug 24, 2024

Interesting!

% file CustomizableStarSystems-v2.1.0.zip 
CustomizableStarSystems-v2.1.0.zip: Zip archive data, at least v2.0 to extract, compression method=store

These fail for me:

  • Keka
  • Better Zip

This fails in a different way

  • The Unarchiver
  • unzip (cli)
  • 7z (cli)

These work:

  • Archive Utility (macOS Sonoma)
  • MacZip

@aonez aonez added the wont fix label Aug 26, 2024
@aonez aonez added this to the How-to milestone Aug 26, 2024
@aonez aonez changed the title [BUG] Incorrect ZIP extraction ZIP extraction containing backwards slashes \ in path names Aug 26, 2024
@aonez
Copy link
Owner

aonez commented Aug 26, 2024

This is fixed in the 2.1.1 release of CustomizableStarSystems. The issue is in the ZIP itself that is using backwards slashes \ instead of forward slashes / in the path names. As stated in the APPNOTE.txt:

   4.4.17 file name: (Variable)

       4.4.17.1 The name of the file, with optional relative path.
       The path stored MUST NOT contain a drive or
       device letter, or a leading slash.  All slashes
       MUST be forward slashes '/' as opposed to
       backwards slashes '\' for compatibility with Amiga
       and UNIX file systems etc.  If input came from standard
       input, there is no file name field. 

The bundled archiver and MacZip are converting those slashes. This can have unexpected results, even if in this case "fixed" the bad crafted ZIP file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants