* Stylecop Rules and Fixes
This commit is contained in:
Qstick
2020-01-03 07:49:24 -05:00
committed by GitHub
parent 63d669178d
commit f77a2feeef
1307 changed files with 8704 additions and 7404 deletions
@@ -11,8 +11,15 @@ namespace NzbDrone.Common.Extensions
{
const int bytesInKb = 1024;
if (bytes < 0) return "-" + SizeSuffix(-bytes);
if (bytes == 0) return "0 B";
if (bytes < 0)
{
return "-" + SizeSuffix(-bytes);
}
if (bytes == 0)
{
return "0 B";
}
var mag = (int)Math.Log(bytes, bytesInKb);
var adjustedSize = bytes / (decimal)Math.Pow(bytesInKb, mag);