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): Remove parent dir when extract_dir is nested dir #3763

Closed
wants to merge 2 commits into from
Closed

Conversation

linsui
Copy link
Contributor

@linsui linsui commented Nov 22, 2019

When extract_dir is nested dir, the parent dir won't be removed by movedir.

Test with kubectl and wire .

if (!$IsTar -and $ExtractDir) {
$OriDestinationPath = $DestinationPath
$DestinationPath = "$DestinationPath\_tmp"
Copy link
Member

Choose a reason for hiding this comment

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

You could use Join-Path to avoid using TrimEnd("\").

Copy link
Contributor Author

@linsui linsui Nov 22, 2019

Choose a reason for hiding this comment

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

I just keep it consistent with other expanders. Should I change all of them?

Copy link
Member

@niheaven niheaven Nov 22, 2019

Choose a reason for hiding this comment

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

Could you try if the script works without TrimEnd("\")? i.e. if 7-zip recognize aaa\\temp. I trim \ in msi's since #3466 (comment), and Expand-Archive use aaa\\_tmp as aaa\_tmp so it doesn't need trim end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It works. I got, I'll remove it. Thanks!

@Ash258 Ash258 mentioned this pull request Aug 23, 2020
21 tasks
@linsui linsui closed this Oct 9, 2021
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