Ticket #431: deluge_patch1

File deluge_patch1, 641 bytes (added by anonymous, 16 years ago)
Line 
1--- deluge/common.py (revision 3694)
2+++ deluge/common.py (working copy)
3@@ -262,13 +262,13 @@
4 def fsize(fsize_b):
5 """Returns formatted string describing filesize
6 fsize_b should be in bytes
7- Returned value will be in either KB, MB, or GB
8+ Returned value will be in either KiB, MiB, or GiB
9 """
10 fsize_kb = fsize_b / 1024.0
11- if fsize_kb < 1000:
12+ if fsize_kb < 1024:
13 return "%.1f KiB" % fsize_kb
14 fsize_mb = fsize_kb / 1024.0
15- if fsize_mb < 1000:
16+ if fsize_mb < 1024:
17 return "%.1f MiB" % fsize_mb
18 fsize_gb = fsize_mb / 1024.0
19 return "%.1f GiB" % fsize_gb