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(decompress): '$ExtractDir' error with '.zip' and subdir #3472

Merged
merged 1 commit into from
May 17, 2019

Conversation

niheaven
Copy link
Member

@niheaven niheaven commented May 17, 2019

Sorry for this 2nd fix...

For some extract_dir in .zip that has sub-dir, the former one would remove parent dir and get error (flac, flac-1.3.2-win\win64), now use temp dir instead. And also fix .msi, in case of some installer that don't have SourceDir.

Expand-DarkArchive will be used in wix extraction, so it doesn't need -ExtractDir.

Expand-7zipArchive and Expand-InnoArchive works well.

Tested:

  • calibre-normal (msi, PFiles\Calibre2)
  • flac (zip, flac-1.3.2-win\win64)
  • pkg-config (zip, multiple url and extract_dir)

BTW, Expand-Archive has -PassThru param in PowerShell 6+, and it will be more convinient to support -ExtractDir with it. I'll check function's source code and plan to rewrite Expand-ZipArchive.

Fix #3473, ref #3473 (comment)

@r15ch13 r15ch13 merged commit a775d45 into ScoopInstaller:develop May 17, 2019
@niheaven niheaven deleted the fix-extractdir branch May 19, 2019 10:22
r15ch13 pushed a commit that referenced this pull request Jun 24, 2019
For some `extract_dir` in .zip that has sub-dir, the former one would remove parent dir and get error (flac, flac-1.3.2-win\win64), now use temp dir instead. And also fix .msi, in case of some installer that don't have `SourceDir`.

`Expand-DarkArchive` will be used in wix extraction, so it doesn't need `-ExtractDir`.

`Expand-7zipArchive` and `Expand-InnoArchive` works well.

Tested:

- calibre-normal (msi, PFiles\Calibre2)
- flac (zip, flac-1.3.2-win\win64)
- pkg-config (zip, multiple url and extract_dir)

BTW, `Expand-Archive` has `-PassThru` param in PowerShell 6+, and it will be more convinient to support `-ExtractDir` with it. I'll check function's source code and plan to rewrite `Expand-ZipArchive`.

Fix #3473, ref #3473 (comment)
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