Skip to content

Commit

Permalink
Fixed Arithmetic Overflow error when displaying information after com…
Browse files Browse the repository at this point in the history
…pressing folders >2GB in size.
  • Loading branch information
Iridium-IO committed Oct 15, 2017
1 parent 062dffa commit 5a2d24f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions WindowsApp1/Compact.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Imports System.Text.RegularExpressions
Imports Ookii.Dialogs 'Uses Ookii Dialogs for the non-archaic filebrowser dialog. http://www.ookii.org/Software/Dialogs

Public Class Compact
Dim version = "1.3.1"
Dim version = "1.3.2"
Private WithEvents MyProcess As Process
Private Delegate Sub AppendOutputTextDelegate(ByVal text As String)

Expand Down Expand Up @@ -460,11 +460,13 @@ Public Class Compact
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.

Dim numberFilesCompressed = 0
Dim querySize = 0
Dim querySize As Int64 = 0


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


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

Expand Down Expand Up @@ -744,7 +746,4 @@ Public Class Compact
'MsgBox(compactArgs)
End Sub




End Class
4 changes: 2 additions & 2 deletions WindowsApp1/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.3.1.0")>
<Assembly: AssemblyFileVersion("1.3.1.0")>
<Assembly: AssemblyVersion("1.3.2.0")>
<Assembly: AssemblyFileVersion("1.3.2.0")>

0 comments on commit 5a2d24f

Please sign in to comment.