Bug 205959

Summary: wrong file size total with properties dialog
Product: [Unmaintained] kdelibs Reporter: MisterE <edwin>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: finex
Priority: NOR    
Version First Reported In: SVN   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description MisterE 2009-09-02 10:18:52 UTC
Version:           1.3 (using 4.3.00 (KDE 4.3.0), Debian packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.30-1-amd64

i call it a bug, but the shell makes the same "mistake".

When calculating a total of all files it also count the size of directories. But the size of a directory can increase when adding files to it, when deleting these files the directory stays at the same size.

This can result in having two directories with the same content, but different size.

example:
jeroen@laptop:/tmp/bla$ mkdir klont
jeroen@laptop:/tmp/bla$ ls -l
drwxr-xr-x 2 jeroen jeroen 4096 Aug 21 15:15 klont
jeroen@laptop:/tmp/bla$ for x in `seq 1 1000`; do touch klont/$x; done
jeroen@laptop:/tmp/bla$ ls -l
drwxr-xr-x 2 jeroen jeroen 20480 Aug 21 15:15 klont
jeroen@laptop:/tmp/bla$ rm klont/*
jeroen@laptop:/tmp/bla$ ls -l
drwxr-xr-x 2 jeroen jeroen 20480 Aug 21 15:15 klont
Comment 1 FiNeX 2009-09-02 11:19:56 UTC
This behaviour depends from the ext filesystem which I imagine you're using.

This issue has already been discussed in the ext3/linux kernel mailing list.
Comment 2 FiNeX 2009-09-02 11:22:52 UTC
This is one of the threads: http://lkml.org/lkml/2009/5/14/362