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

Gzip restores original filename by default #82

Closed
1 task done
nuomi1 opened this issue Oct 3, 2017 · 8 comments
Closed
1 task done

Gzip restores original filename by default #82

nuomi1 opened this issue Oct 3, 2017 · 8 comments
Assignees
Milestone

Comments

@nuomi1
Copy link

nuomi1 commented Oct 3, 2017

  • Add an option to use/ignore the original filename if present

macOS 10.12.6

wget -c https://swscan.apple.com/content/catalogs/others/index-10.13-1.sucatalog.gz

  • Keka 1.1.0-beta.3 (2120): index-10.13-1.sucatalog.nk11p01su-swupdate002.isu.apple.com.gztmp
  • BetterZip 4.0.1 (1174): index-10.13-1.sucatalog
  • Archive Utility 10.10 (81): index-10.13-1.sucatalog
@aonez
Copy link
Owner

aonez commented Oct 3, 2017

wget -c https://swscan.apple.com/content/catalogs/others/index-10.13-1.sucatalog.gz

This url points to an xml file, even if it has a gz extension.

@nuomi1
Copy link
Author

nuomi1 commented Oct 3, 2017

file index-10.13-1.sucatalog.gz
index-10.13-1.sucatalog.gz: gzip compressed data, was "index-10.13-1.sucatalog.nk11p01su-swupdate002.isu.apple.com.gzt", last modified: Tue Oct  3 12:20:56 2017, from Unix

......

@aonez
Copy link
Owner

aonez commented Oct 3, 2017

Sorry my mistake, it is indeed a gz. Safari opened it like the xml it contains, that confused me. But it has the magic number 1F8B.

@aonez
Copy link
Owner

aonez commented Oct 3, 2017

Technically this is not wrong, since it's applying the original filename. The other apps are just ignoring the original name.

@aonez
Copy link
Owner

aonez commented Oct 3, 2017

Here I've stripped the original filename data, so it just names the content as the gz file:

index-10.13-1.sucatalog.gz.zip

I don't think this is something to be changed. If the package creator included the original filename, it must be replicated.

@aonez
Copy link
Owner

aonez commented Oct 3, 2017

I'm seeing at least GNU Gzip always stores the original filename but only uses it if -N flag is used, so by default does not restore the original filename.

@aonez aonez changed the title Extract wrong filename Gzip restores original filename by default Oct 3, 2017
@aonez aonez self-assigned this Oct 3, 2017
@aonez aonez added this to the Future milestone Oct 10, 2017
@aonez aonez modified the milestones: Future, 1.2.0 Nov 23, 2018
@aonez
Copy link
Owner

aonez commented May 7, 2020

This will be available using setting the option IgnoreGZIPName in next 1.2.0 revision.

@aonez aonez closed this as completed May 7, 2020
@aonez
Copy link
Owner

aonez commented Jun 10, 2020

Released in the latest dev build: v1.2.0-dev.3901

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

2 participants