Permalink
Browse files

RavenDB-325 Size is studio is wrong when shown in MB

  • Loading branch information...
1 parent 7abdc43 commit 36c37d6d7c3bef41effa6f2241f8f15821a6b81a @ayende ayende committed May 29, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 Raven.Studio/Models/EditableDocumentModel.cs
@@ -314,12 +314,12 @@ public string DocumentSize
{
double byteCount = Encoding.UTF8.GetByteCount(JsonData) + Encoding.UTF8.GetByteCount(JsonMetadata);
string sizeTerm = "Bytes";
- if (byteCount > 1024 * 1024)
+ if (byteCount >= 1024 * 1024)
{
sizeTerm = "MBytes";
- byteCount = byteCount / 1024 * 1024;
+ byteCount = byteCount / (1024 * 1024);
}
- else if (byteCount > 1024)
+ else if (byteCount >= 1024)
{
sizeTerm = "KBytes";
byteCount = byteCount / 1024;

0 comments on commit 36c37d6

Please sign in to comment.