@@ -28,10 +28,10 @@ function Expand-7zipArchive {
2828 $7zPath = Get-HelperPath - Helper 7zip
2929 }
3030 $LogPath = " $ ( Split-Path $Path ) \7zip.log"
31- $ArgList = @ (' x' , " `" $Path `" " , " -o`" $DestinationPath `" " , ' -y' )
31+ $ArgList = @ (' x' , $Path , " -o$DestinationPath " , ' -y' )
3232 $IsTar = ((strip_ext $Path ) -match ' \.tar$' ) -or ($Path -match ' \.t[abgpx]z2?$' )
3333 if (! $IsTar -and $ExtractDir ) {
34- $ArgList += " -ir!`" $ExtractDir \*`" "
34+ $ArgList += " -ir!$ExtractDir \*"
3535 }
3636 if ($Switches ) {
3737 $ArgList += (-split $Switches )
@@ -53,7 +53,7 @@ function Expand-7zipArchive {
5353 }
5454 if ($IsTar ) {
5555 # Check for tar
56- $Status = Invoke-ExternalCommand $7zPath @ (' l' , " `" $Path `" " ) - LogPath $LogPath
56+ $Status = Invoke-ExternalCommand $7zPath @ (' l' , $Path ) - LogPath $LogPath
5757 if ($Status ) {
5858 # get inner tar file name
5959 $TarFile = (Select-String - Path $LogPath - Pattern ' [^ ]*tar$' ).Matches.Value
@@ -97,7 +97,7 @@ function Expand-ZstdArchive {
9797 $LogPath = Join-Path (Split-Path $Path ) ' zstd.log'
9898 $DestinationPath = $DestinationPath.TrimEnd (' \' )
9999 ensure $DestinationPath | Out-Null
100- $ArgList = @ (' -d' , " `" $Path `" " , ' --output-dir-flat' , " `" $DestinationPath `" " , ' -f' , ' -v' )
100+ $ArgList = @ (' -d' , $Path , ' --output-dir-flat' , $DestinationPath , ' -f' , ' -v' )
101101
102102 if ($Switches ) {
103103 $ArgList += (-split $Switches )
@@ -148,10 +148,10 @@ function Expand-MsiArchive {
148148 }
149149 if ((get_config MSIEXTRACT_USE_LESSMSI)) {
150150 $MsiPath = Get-HelperPath - Helper Lessmsi
151- $ArgList = @ (' x' , " `" $Path `" " , " `" $DestinationPath \\ `" " )
151+ $ArgList = @ (' x' , $Path , " $DestinationPath \" )
152152 } else {
153153 $MsiPath = ' msiexec.exe'
154- $ArgList = @ (' /a' , " `" $Path `" " , ' /qn' , " TARGETDIR=`" $DestinationPath \\ SourceDir`" " )
154+ $ArgList = @ (' /a' , " `" $Path `" " , ' /qn' , " TARGETDIR=`" $DestinationPath \SourceDir`" " )
155155 }
156156 $LogPath = " $ ( Split-Path $Path ) \msi.log"
157157 if ($Switches ) {
@@ -200,7 +200,7 @@ function Expand-InnoArchive {
200200 $Removal
201201 )
202202 $LogPath = " $ ( Split-Path $Path ) \innounp.log"
203- $ArgList = @ (' -x' , " -d`" $DestinationPath `" " , " `" $Path `" " , ' -y' )
203+ $ArgList = @ (' -x' , " -d$DestinationPath " , $Path , ' -y' )
204204 switch - Regex ($ExtractDir ) {
205205 ' ^[^{].*' { $ArgList += " -c{app}\$ExtractDir " }
206206 ' ^{.*' { $ArgList += " -c$ExtractDir " }
@@ -267,7 +267,7 @@ function Expand-DarkArchive {
267267 $Removal
268268 )
269269 $LogPath = " $ ( Split-Path $Path ) \dark.log"
270- $ArgList = @ (' -nologo' , " -x `" $DestinationPath `" " , " `" $Path `" " )
270+ $ArgList = @ (' -nologo' , ' -x ' , $DestinationPath , $Path )
271271 if ($Switches ) {
272272 $ArgList += (-split $Switches )
273273 }
0 commit comments