|
1 | 1 | Imports System.IO |
2 | 2 | Imports System.Runtime.InteropServices |
| 3 | +Imports System.Text.RegularExpressions |
3 | 4 | Imports Ookii.Dialogs 'Uses Ookii Dialogs for the non-archaic filebrowser dialog. http://www.ookii.org/Software/Dialogs |
4 | 5 |
|
5 | 6 | Public Class Compact |
@@ -379,16 +380,18 @@ Public Class Compact |
379 | 380 | 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. |
380 | 381 |
|
381 | 382 |
|
382 | | - Dim oldFolderSize = byteComparisonRaw.Substring _ |
383 | | - (0, byteComparisonRaw.IndexOf("t")).Trim.Replace(",", "") |
384 | | - |
| 383 | + 'Dim oldFolderSize = byteComparisonRaw.Substring _ |
| 384 | + '(0, byteComparisonRaw.IndexOf("t")).Trim.Replace(",", "") |
| 385 | + Dim oldFolderSize = Long.Parse(Regex.Replace(byteComparisonRaw.Substring _ |
| 386 | + (0, byteComparisonRaw.IndexOf("t")), "[^\d]", "")) |
385 | 387 |
|
386 | 388 | Dim newFolderSizem1 = byteComparisonRaw.Substring _ |
387 | 389 | (byteComparisonRaw.LastIndexOf("n"c) + 1) |
388 | 390 |
|
389 | | - Dim newfoldersize = newFolderSizem1.Substring _ |
390 | | - (0, newFolderSizem1.Length - 7).Trim.Replace(",", "") |
391 | | - |
| 391 | + 'Dim newfoldersize = newFolderSizem1.Substring _ |
| 392 | + ' (0, newFolderSizem1.Length - 7).Trim.Replace(",", "") |
| 393 | + Dim newfoldersize = Long.Parse(Regex.Replace(newFolderSizem1.Substring _ |
| 394 | + (0, newFolderSizem1.Length - 7), "[^\d]", "")) |
392 | 395 |
|
393 | 396 | origSizeLabel.Text = GetOutputSize(oldFolderSize, True) |
394 | 397 | compressedSizeLabel.Text = GetOutputSize(newfoldersize, True) |
|
0 commit comments