We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4b6773 commit 80689eeCopy full SHA for 80689ee
1 file changed
src/Common.cs
@@ -504,11 +504,11 @@ public static long GetTotalSize(TreeView sourceTree)
504
// Formats bytes as a human-readable string
505
public static string GetFormattedBytes(long bytes)
506
{
507
- if (bytes >= 1000000000)
+ if (Math.Abs(bytes) >= 1000000000)
508
509
return (Math.Truncate((double)bytes / 100000000) / 10).ToString("N1") + "GB";
510
}
511
- else if (bytes >= 1000000)
+ else if (Math.Abs(bytes) >= 1000000)
512
513
return (Math.Truncate((double)bytes / 100000) / 10).ToString("N1") + "MB";
514
0 commit comments