mirror of
https://github.com/Radarr/Radarr
synced 2025-02-27 16:42:46 +00:00
Size formatted culture invariant.
This commit is contained in:
parent
3244f71e5c
commit
d931626aee
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
namespace NzbDrone.Common.Extensions
|
namespace NzbDrone.Common.Extensions
|
||||||
{
|
{
|
||||||
|
@ -16,7 +17,7 @@ public static string SizeSuffix(this Int64 bytes)
|
||||||
var mag = (int)Math.Log(bytes, bytesInKb);
|
var mag = (int)Math.Log(bytes, bytesInKb);
|
||||||
var adjustedSize = bytes / (decimal)Math.Pow(bytesInKb, mag);
|
var adjustedSize = bytes / (decimal)Math.Pow(bytesInKb, mag);
|
||||||
|
|
||||||
return string.Format("{0:n1} {1}", adjustedSize, SizeSuffixes[mag]);
|
return string.Format(CultureInfo.InvariantCulture, "{0:n1} {1}", adjustedSize, SizeSuffixes[mag]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue