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

fix(depends): Avoid digits in archive file extension #4915

Merged
merged 17 commits into from
May 16, 2022

Conversation

issaclin32
Copy link
Member

@issaclin32 issaclin32 commented May 10, 2022

  • This avoids extraction error for 7-zip split archives like xxx.7z.001, xxx.7z.002, ....

for example:

"url": [
    "https://someapp.com/files/some-app.7z.001",
    "https://someapp.com/files/some-app.7z.002"
]

In this case. some-app.7z.001 extracts properly but some-app.7z.002 is treated as another independent archive, resulting in extraction error.

  • This fix would be useful when we need to split files in ScoopInstaller/Binary (into multiple 7z archives) to avoid using Git LFS.

@issaclin32 issaclin32 changed the base branch from master to develop May 10, 2022 10:36
@issaclin32 issaclin32 changed the title fix(depends): Avoid digits in archive file extensions (except for .7z and .001) fix(depends): Avoid digits in archive file extension (except for .7z and .001) May 10, 2022
@niheaven
Copy link
Member

After this is applied, are .00x removed after 7z extracted the files?

@issaclin32
Copy link
Member Author

After this is applied, are .00x removed after 7z extracted the files?

Missed that. Thanks for reminding me.

@issaclin32 issaclin32 changed the title fix(depends): Avoid digits in archive file extension (except for .7z and .001) fix(depends, decompress): Avoid digits in archive file extension (except for .7z and .001) May 15, 2022
@issaclin32 issaclin32 changed the title fix(depends, decompress): Avoid digits in archive file extension (except for .7z and .001) fix(depends): Avoid digits in archive file extension (except for .7z and .001) May 15, 2022
Copy link
Member

@niheaven niheaven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Using -replace may be more readable
  2. I've updated the test scripts and test cases, please review them

lib/decompress.ps1 Outdated Show resolved Hide resolved
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
@issaclin32
Copy link
Member Author

  1. I've updated the test scripts and test cases, please review them

The test scripts & cases works fine for me. Thank you.

@niheaven niheaven changed the title fix(depends): Avoid digits in archive file extension (except for .7z and .001) fix(depends): Avoid digits in archive file extension May 16, 2022
@niheaven niheaven merged commit b130e60 into develop May 16, 2022
@niheaven niheaven deleted the issaclin32-archive-ext branch May 16, 2022 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants