! 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 !
thunar-1.6.2 incorrectly counts directory sizes
Status:
RESOLVED: WONTFIX

Comments

Description Ikonta 2013-03-24 16:31:45 CET
I use Thunar-1.6.2 with XFce-4.10 on amd64 Gentoo Linux.

Making a check for umount function on USB flash device I've updraded Thunar to 1.6.2.

And find, that this version significantly miscounts directory size.
Oryginally thunar showed 700 Mb on 670Mb-size directory.

Now I've done another check:
$ du -hs photo/
8.0G	photo/

Thunar shows photo directory is 8.5Gb.

Should I provide any additional data, or this report is enough?
Comment 1 Nick Schermer editbugs 2013-03-24 20:25:08 CET
Thunar uses si (power of 1000). So add --si to du and you will see the result is much closer.
Comment 2 Ikonta 2013-03-25 06:23:47 CET
(In reply to comment #1)
> Thunar uses si (power of 1000). So add --si to du and you will see the
> result is much closer.

Thank you.
But it means I'll have to change many standard sizes I remeber.
And I don't like this idea...

Could you make size count base to be set at compile-time as ./configure script option?
Comment 3 Samuli Suominen 2013-03-25 06:27:41 CET
(In reply to comment #2)
> (In reply to comment #1)
> > Thunar uses si (power of 1000). So add --si to du and you will see the
> > result is much closer.
> 
> Thank you.
> But it means I'll have to change many standard sizes I remeber.
> And I don't like this idea...
> 
> Could you make size count base to be set at compile-time as ./configure
> script option?

./configure option would only make difference for people building Thunar out of sources, if anything, this should be a runtime configurable option...

although i'm OK with how it already is :/
Comment 4 Nick Schermer editbugs 2013-03-25 08:39:59 CET
For 1024 (iec units) the glib manual says:

use IEC (base 1024) units with "KiB"-style suffixes. IEC units should only be used for reporting things with a strong "power of 2" basis, like RAM sizes or RAID stripe sizes. Network and storage sizes should be reported in the normal SI units.

https://developer.gnome.org/glib/2.34/glib-Miscellaneous-Utility-Functions.html#GFormatSizeFlags

A runtime option is not an option, its simply the wrong standard to show MiB and GiB. Unfortunately du keeps this in the middle by using 5G, so you never know whether this is GiB or GB.

Bug #9946

Reported by:
Ikonta
Reported on: 2013-03-24
Last modified on: 2013-03-25

People

Assignee:
Jannis Pohlmann
CC List:
2 users

Version

Version:
unspecified

Attachments

Additional information