Skip to content
Permalink
Browse files

[I] Change LongToFileSizeConverter output, enforcing 2 digits after t…

…he dot
  • Loading branch information...
Baine committed Jan 25, 2019
1 parent 0826b08 commit a152d4456dc0c10dea12ede4016c7073fdbdffe0
Showing with 1 addition and 1 deletion.
  1. +1 −1 Shoko.Desktop/WPFHelpers/LongToFileSizeConverter.cs
@@ -31,7 +31,7 @@ private static string FormatFileSize(long byteCount)
long bytes = Math.Abs(byteCount);
int place = System.Convert.ToInt32(Math.Floor(Math.Log(bytes, 1024)));
double num = Math.Round(bytes / Math.Pow(1024, place), 2);
return num + " " + suf[place];
return num.ToString("0.00", System.Globalization.CultureInfo.InvariantCulture) + " " + suf[place];
}

public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

0 comments on commit a152d44

Please sign in to comment.
You can’t perform that action at this time.