Skip to content

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

Merged
niheaven merged 17 commits intodevelopfrom
issaclin32-archive-ext
May 16, 2022
Merged

fix(depends): Avoid digits in archive file extension#4915
niheaven merged 17 commits intodevelopfrom
issaclin32-archive-ext

Conversation

@issaclin32
Copy link
Copy Markdown
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
Copy Markdown
Member

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

@issaclin32
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread lib/decompress.ps1
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
@issaclin32
Copy link
Copy Markdown
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.

2 participants