aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Unzip.vb
diff options
context:
space:
mode:
authorEverythingWindows <[email protected]>2022-11-20 19:50:10 +0700
committerEverythingWindows <[email protected]>2022-11-20 19:50:10 +0700
commit9d384be17594240918b6b277521d3eaa15151ae9 (patch)
tree9c7d3b2d35f6639464951cc4349afa338a2f069b /ShiftOS-TheRevival/TerminalApplications/Internal/Com_Unzip.vb
parent2fa56446be7a049994786931e9145043362e8adb (diff)
downloadshiftos-therevival-old-9d384be17594240918b6b277521d3eaa15151ae9.tar.gz
shiftos-therevival-old-9d384be17594240918b6b277521d3eaa15151ae9.tar.bz2
shiftos-therevival-old-9d384be17594240918b6b277521d3eaa15151ae9.zip
Optimization on UNZIP
Diffstat (limited to 'ShiftOS-TheRevival/TerminalApplications/Internal/Com_Unzip.vb')
-rw-r--r--ShiftOS-TheRevival/TerminalApplications/Internal/Com_Unzip.vb7
1 files changed, 3 insertions, 4 deletions
diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Unzip.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Unzip.vb
index c08bc08..37231fb 100644
--- a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Unzip.vb
+++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Unzip.vb
@@ -8,10 +8,8 @@ Module Com_Unzip
UnzipString = RawCommand.Substring(6)
If UnzipString Like "-d '*.zip'" Then
Dim UnzipEXE() As String = UnzipString.Split("''")
- NewLine(UnzipEXE(1))
If File.Exists(Console.CurrentDirectory & "\" & UnzipEXE(1)) = True Then
Dim UnzipDir As String = UnzipEXE(1).Replace(".zip", "")
- NewLine(UnzipDir)
Dim UnzipRandomInt As Integer
Dim UnzipRandom As New Random
UnzipRandomInt = UnzipRandom.Next(1, 1000000)
@@ -30,10 +28,8 @@ Module Com_Unzip
End If
If UnzipString Like "-f '*.zip'" Then
Dim UnzipEXE() As String = UnzipString.Split("''")
- NewLine(UnzipEXE(1))
If File.Exists(Console.CurrentDirectory & "\" & UnzipEXE(1)) = True Then
Dim UnzipDir As String = UnzipEXE(1).Replace(".zip", "")
- NewLine(UnzipDir)
Dim UnzipRandomInt As Integer
Dim UnzipRandom As New Random
UnzipRandomInt = UnzipRandom.Next(1, 1000000)
@@ -80,6 +76,7 @@ Module Com_Unzip
NewLine("Copying " & ChildFile.Name & "...")
If Not File.Exists(Path.Combine(DestDir.FullName, ChildFile.Name)) Then
ChildFile.CopyTo(Path.Combine(DestDir.FullName, ChildFile.Name), False)
+ AddLine(" OK")
End If
End If
Next
@@ -87,8 +84,10 @@ Module Com_Unzip
' copy all the sub-directories by recursively calling this same routine
Dim SubDir As DirectoryInfo
For Each SubDir In SourceDir.GetDirectories()
+ NewLine("Copying " & SubDir.Name & "...")
CopyDirectory(SubDir.FullName, Path.Combine(DestDir.FullName,
SubDir.Name), Overwrite)
+ AddLine(" OK")
Next
Else
Throw New DirectoryNotFoundException("Source directory does not exist: " + SourceDir.FullName)