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

Backslashes in released zip archives paths #3559

Open
tansy opened this issue May 6, 2024 · 8 comments · May be fixed by #3852
Open

Backslashes in released zip archives paths #3559

tansy opened this issue May 6, 2024 · 8 comments · May be fixed by #3852
Labels
unrelated to 1.0 Things that need not be done before the 1.0 version milestone

Comments

@tansy
Copy link

tansy commented May 6, 2024

Describe the bug

In relased zip archives tgere are backslashes in paths. Zip uses forward slash as path separator.

It's a problem add not all un/zip clients assume \ to be a /.

To Reproduce

Get the released archives and see the path names, like cmake\hwy\hwy-config-release.cmake.

Expected behavior

To use forward slashed as path separator in zips.

Environment

  • OS: Linux

Additional context

specification is clear about that:

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 '/'

@mo271 mo271 added the unrelated to 1.0 Things that need not be done before the 1.0 version milestone label Sep 16, 2024
@mo271
Copy link
Member

mo271 commented Sep 16, 2024

Might this be cause by using an too old version of Powershell, see PowerShell/Microsoft.PowerShell.Archive#48 ?
Is this still a problem in the released arxives of v0.11.0?

@tansy
Copy link
Author

tansy commented Sep 20, 2024

Is this still a problem in the released arxives of v0.11.0?

Yes.

$ unzip -l jxl-x64-windows.zip 
Archive:  jxl-x64-windows.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
      824  09-13-2024 07:19   cmake\hwy\hwy-config-release.cmake
     2827  09-13-2024 07:18   cmake\hwy\hwy-config-version.cmake
     4344  09-13-2024 07:19   cmake\hwy\hwy-config.cmake
      311  09-13-2024 07:18   pkgconfig\libbrotlicommon.pc
      339  09-13-2024 07:18   pkgconfig\libbrotlidec.pc
      339  09-13-2024 07:18   pkgconfig\libbrotlienc.pc
      278  09-13-2024 07:18   pkgconfig\libhwy.pc
      362  09-13-2024 07:19   pkgconfig\libjxl.pc
      332  09-13-2024 07:19   pkgconfig\libjxl_cms.pc
      359  09-13-2024 07:19   pkgconfig\libjxl_threads.pc

Might this be cause by using an too old version of Powershell

Don't use Powershell then. Use Zip, like Info-ZIP.

@mo271
Copy link
Member

mo271 commented Sep 20, 2024

Thanks for checking!
I didn't quite understand if this can be reproduced with an up-to-date version of powershell or not.

What version did you use here?

@tansy
Copy link
Author

tansy commented Sep 20, 2024

What version did you use here?

As can be seen in modification time v0.11.0 from 09-13-2024.

@mo271
Copy link
Member

mo271 commented Sep 20, 2024

Ah, I meant "what version of PowerShell?"

@tansy
Copy link
Author

tansy commented Sep 20, 2024

I don't use Powershell. In Linux?

And what it has to do with me? You, I mean a in a repo, produce this file. I only point out its problems, problems that user/s have - when unpacking this archive can produce files with backslashes in names. I can only assume that these backslashes meant to be path separators, but they're not.

@mo271
Copy link
Member

mo271 commented Sep 25, 2024

Sorry for the confusion! I didn't read carefully enough. In any case, I investigated the problem, and the root cause is an older of Compress-Arxive we used for the releases. We plan now to switch to 7z, where the problem with the slashes will not be present. See #3852

@mo271 mo271 linked a pull request Sep 26, 2024 that will close this issue
@tansy
Copy link
Author

tansy commented Sep 29, 2024

We plan now to switch to 7z

Zip (InfoZip) would be just fine. Actually it was 7zip having trouble with that zip file. InfoZip warned about the problem but unpacked it correctly, I mean with 'intended' paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unrelated to 1.0 Things that need not be done before the 1.0 version milestone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants