Review Request: Fix KIO::directorySizeJob returns wrong file count in some situtaions.

Ingo Klöcker kloecker at kde.org
Sun Mar 29 15:48:22 BST 2009



> On 2009-03-29 05:41:12, Ingo Klöcker wrote:
> > I don't see anything wrong with the current behavior. IMO this is not a bug, but a misinterpretation of the information shown in the Properties dialog. The dialog (opened via the context menu of the selected items) shows the properties of the selected items B and C. Neither B nor C contain any files or sub-folders (before the creation of D), so the counts (0 files, 0 sub-folders) are correct in my opinion.
> > 
> > Fab's expectation to get 1 file, 0 sub-folders is inconsistent. Either all selected items (i.e. files _and_ folders) are included in the counts (i.e. 1 file, 1 sub-folders if B and C are selected) or they are not included.
> > 
> > FWIW, Konqueror 3.5.9 shows exactly the same behavior which appears to be a strong indication that the dialog shows what it is meant to show.
> >
> 
> Rahman Duran wrote:
>     You misundertood the problem. The problem is: if you select a directory and a
>     file, the dialog doesn't count the selected file. 
>     
>     Select a dir that  contains n files in it. if you select this dir and a file
>     the dialog shows n files instead of n+1. Problem is it only counts the files in
>     the selected dirs.

I understand perfectly what you think the problem is. I disagree with you and claim that this is not a problem, but that you are making wrong assumptions about what the numbers should be. With your reasoning the folder dir in test would have to be counted as well, i.e. the dialog should show "9 files, 1 sub-folders" instead of "4 files, 0 sub-folders".

Instead of fixing KIO::directorySizeJob (which IMO does not need fixing) I suggest improving the way the Properties dialog presents the numbers.


- Ingo


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/463/#review686
-----------------------------------------------------------


On 2009-03-29 05:57:27, Rahman Duran wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/463/
> -----------------------------------------------------------
> 
> (Updated 2009-03-29 05:57:27)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> Quote form bug report:
> 
> Dolphin does not count files correctly. Go to a random folder (folder A) with a
> subfolder. Select all subfolders. Right-click on selection, choose Properties.
> There, the correct number of files in all selected subfolders is presented.
> 
> Next, select all subfolders and one additional file in folder A. Again
> right-click on selection and choose Properties. The additionally selected file
> is not counted.
> 
> Example:
> Create new empty folder A.
> Create a subfolder of A called B.
> Create a file in A called C.
> 
> Select B. Properties lists 0 files, 0 subfolders.
> Select B and C. Properties still lists 0 files, 0 subfolders.
> 
> Create file in subfolder B called D.
> Select B and C. Properties lists 1 files, 0 subfolders.
> 
> 
> This addresses bug 171391.
>     https://bugs.kde.org/show_bug.cgi?id=171391
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kio/kio/directorysizejob.cpp 946358 
> 
> Diff: http://reviewboard.kde.org/r/463/diff
> 
> 
> Testing
> -------
> 
> Tested latest trunk.
> 
> 
> Screenshots
> -----------
> 
> The wrong behavior
>   http://reviewboard.kde.org/r/463/s/84/
> 
> 
> Thanks,
> 
> Rahman
> 
>





More information about the kde-core-devel mailing list