mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-06-20 22:21:09 +10:00
Replacing Expand-Archive cmdlet
Replacing the Expand-Archive cmdlet with a more omnivorous .NET Framework
This commit is contained in:
+5
-3
@@ -100,11 +100,13 @@ catch [System.Management.Automation.MethodInvocationException] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Expand-Archive -Force -LiteralPath "$PWD\chrome_elf.zip" -DestinationPath $PWD
|
Add-Type -Assembly 'System.IO.Compression.FileSystem'
|
||||||
|
$zip = [System.IO.Compression.ZipFile]::Open("$PWD\chrome_elf.zip", 'read')
|
||||||
|
[System.IO.Compression.ZipFileExtensions]::ExtractToDirectory($zip, $PWD)
|
||||||
|
$zip.Dispose()
|
||||||
|
|
||||||
Remove-Item -LiteralPath "$PWD\chrome_elf.zip"
|
Remove-Item -LiteralPath "$PWD\chrome_elf.zip"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$webClient.DownloadFile(
|
$webClient.DownloadFile(
|
||||||
# Remote file URL
|
# Remote file URL
|
||||||
|
|||||||
+5
-3
@@ -100,11 +100,13 @@ catch [System.Management.Automation.MethodInvocationException] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Expand-Archive -Force -LiteralPath "$PWD\chrome_elf.zip" -DestinationPath $PWD
|
Add-Type -Assembly 'System.IO.Compression.FileSystem'
|
||||||
|
$zip = [System.IO.Compression.ZipFile]::Open("$PWD\chrome_elf.zip", 'read')
|
||||||
|
[System.IO.Compression.ZipFileExtensions]::ExtractToDirectory($zip, $PWD)
|
||||||
|
$zip.Dispose()
|
||||||
|
|
||||||
Remove-Item -LiteralPath "$PWD\chrome_elf.zip"
|
Remove-Item -LiteralPath "$PWD\chrome_elf.zip"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$webClient.DownloadFile(
|
$webClient.DownloadFile(
|
||||||
# Remote file URL
|
# Remote file URL
|
||||||
|
|||||||
Reference in New Issue
Block a user