Bug 205959 - wrong file size total with properties dialog
Summary: wrong file size total with properties dialog
Status: RESOLVED UPSTREAM
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: SVN
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-02 10:18 UTC by MisterE
Modified: 2009-09-02 11:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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