Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/decompress.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ function Expand-7zipArchive {
# Check for tar
$Status = Invoke-ExternalCommand $7zPath @('l', "`"$Path`"") -LogPath $LogPath
if ($Status) {
$TarFile = (Get-Content -Path $LogPath)[-5] -replace '.{53}(.*)', '$1' # get inner tar file name
# get inner tar file name
$TarFile = (Select-String -Path $LogPath -Pattern "([^ ]*(?=tar)tar)$") -replace ".*?([^ ]*(?=tar)tar)$", '$1'
Comment thread
chawyehsu marked this conversation as resolved.
Outdated
Expand-7zipArchive -Path "$DestinationPath\$TarFile" -DestinationPath $DestinationPath -ExtractDir $ExtractDir -Removal
} else {
abort "Failed to list files in $Path.`nNot a 7-Zip supported archive file."
Expand Down