! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
File sizes are calculated in Kibibytes, but the UI says Kilobytes, etc
Status:
RESOLVED: FIXED

Comments

Description Hugo Osvaldo Barrera 2011-03-02 04:08:57 CET
File sizes are calculated in Kibibytes, but the UI says Kilobytes.

As stated on the International System of Units (the metric system),
1k = 1000, for any unit.
1kB = 1000B

Since in computing, 1024 is used a lot, Kibibytes and Mebibytes where created;
1KiB = 1024B
1MiB = 1024*1024B

Thunar uses the definition of Kibibytes for calculation, but the UI says
Kilobytes.  This results in the wrong data being presented to the user, with
about 2% error margin for kilobytes, slightly more for megabytes, and notably
more for gigabytes (~8%), and so on exponentially.
And so on.

Please see the following articles for more information:
http://en.wikipedia.org/wiki/International_System_of_Units
http://en.wikipedia.org/wiki/Kibibyte
Comment 1 Nick Schermer editbugs 2012-09-25 12:03:24 CEST
We use the GIO functions for this now.

Bug #7369

Reported by:
Hugo Osvaldo Barrera
Reported on: 2011-03-02
Last modified on: 2012-09-25

People

Assignee:
Jannis Pohlmann
CC List:
3 users

Version

Version:
unspecified

Attachments

Additional information