Skip to content

Commit 5a2d24f

Browse files
committed
Fixed Arithmetic Overflow error when displaying information after compressing folders >2GB in size.
1 parent 062dffa commit 5a2d24f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

WindowsApp1/Compact.vb

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Imports System.Text.RegularExpressions
55
Imports Ookii.Dialogs 'Uses Ookii Dialogs for the non-archaic filebrowser dialog. http://www.ookii.org/Software/Dialogs
66

77
Public Class Compact
8-
Dim version = "1.3.1"
8+
Dim version = "1.3.2"
99
Private WithEvents MyProcess As Process
1010
Private Delegate Sub AppendOutputTextDelegate(ByVal text As String)
1111

@@ -460,11 +460,13 @@ Public Class Compact
460460
Private Sub CalculateSaving() 'Calculations for all the relevant information after compression is completed. All the data is parsed from the console ouput using basic strings, but because that occurs on a different thread, information is stored to variables first (The Status Monitors at the top) then those values are used.
461461

462462
Dim numberFilesCompressed = 0
463-
Dim querySize = 0
463+
Dim querySize As Int64 = 0
464+
464465

465466
If isQueryMode = 0 Then querySize = Long.Parse(Regex.Replace(byteComparisonRaw.Substring _
466467
(0, byteComparisonRaw.IndexOf("t")), "[^\d]", ""))
467468

469+
468470
Dim oldFolderSize = Long.Parse(Regex.Replace(byteComparisonRaw.Substring _
469471
(0, byteComparisonRaw.IndexOf("t")), "[^\d]", ""))
470472

@@ -744,7 +746,4 @@ Public Class Compact
744746
'MsgBox(compactArgs)
745747
End Sub
746748

747-
748-
749-
750749
End Class

WindowsApp1/My Project/AssemblyInfo.vb

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("1.3.1.0")>
35-
<Assembly: AssemblyFileVersion("1.3.1.0")>
34+
<Assembly: AssemblyVersion("1.3.2.0")>
35+
<Assembly: AssemblyFileVersion("1.3.2.0")>

0 commit comments

Comments
 (0)