Version: (using Devel) OS: Linux Installed from: Compiled sources 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 error occurs in Dolphin 1.1.80 from the kde-nightly build from project-neon on Kubuntu Inrepid (latest version).
I can reproduce this bug in KDE4.2 svn (kdelibs rev. 890607/ kdebase rev. 890066). The behaviour is also the same in KDE 4.1.3 (both in my ArchLinux x86_64 box) When you select "B" and "C" (and before creating "D") , and go to properties, in the top of the dialog, it says 1 file and 1 folder (the selected items). but, below the "Location:" text (Location is "A" folder), in the size field it says "0 files, 0 folders" (incorrect item count for the "A" folder). Is like that it wasn't the item count for "A", but for "B" (selected) folder, which doesn't have anything inside. However if you RMB on an empty space inside the "A" folder, and go to properties, it will correctly count the files inside "A" , in this case "1 file , 1 folder" (for folder "B" and file "C")
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. FWIW, Konqueror 3.5.9 shows exactly the same behavior which is a strong indication that the dialog shows what it is meant to show. Also, Fab's expectation to get 1 file, 0 sub-folders is inconsistent. Either the 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.
@Ingo Klöcker 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. A pacth is waiting at reviewboard.kde.org. I will commit it soon.
@Rahman Duran: 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. Instead of fixing KIO::directorySizeJob (which IMO does not need fixing) the Properties dialog should be changed/improved to better convey the meaning of the numbers.
SVN commit 946754 by rduran: BUG: 171391 Fix the wrong file count in file properties dialog M +4 -1 directorysizejob.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=946754
I can confirm this bug with the reproduction instructions in the OP in Dolphin of KDE 4.2.2. Ingo, I understand that the is the behaviour that you want, however it is not what the user expects. I think that the solution might be to replace this text: 0 subfolders, 0 files with this: 1 folder, 0 subfolders, 1 file In this way you can distinguish between top-level directiories and subdirectories. Files should not have this distinction.
@Dotan: Yes, good suggestion.
Decision time.. What are we gonna do with this one?
What's wrong with the suggestion from Comment #6?
@Dotan, lets wait for Peter to reply on this oke?
From my point of view this bug can be closed as fixed: The bug from the original report has been fixed by the commit from comment #5. If there is still something wrong from your point of view, I'd kindly ask to open a new report which describes the open issue in detail (from my point of view the UI can be interpreted in different ways and there might be room for improvements). Thanks!