[dolphin] [Bug 508344] New: Dolphin displays incorrect folder item count when refreshing during ongoing count operation

Tomás Bolaño bugzilla_noreply at kde.org
Sat Aug 16 15:58:48 BST 2025


https://bugs.kde.org/show_bug.cgi?id=508344

            Bug ID: 508344
           Summary: Dolphin displays incorrect folder item count when
                    refreshing during ongoing count operation
    Classification: Applications
           Product: dolphin
      Version First 25.04.3
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: dolphin-bugs-null at kde.org
          Reporter: tomas.bolano at protonmail.com
                CC: kfm-devel at kde.org
  Target Milestone: ---

SUMMARY
When dolphin is counting items in a large folder and we refresh before the
count of a folder completes (e.g., by pressing F5), the interrupted folder
shows an item count that is higher than the actual number of files present.

This appears to be a race condition where the interrupted count operation isn't
properly cancelled, causing the results to accumulate incorrectly. The issue is
reproducible with folders containing several thousands of items where the
counting process is visibly slow enough to interrupt.

This may be considered a rare edge case since it requires both very large
folders and the specific timing of refreshing the view during the counting
process.

STEPS TO REPRODUCE
1. In the dolphin configuration (Settings → Configure Dolphin), in View →
Content Display, the "Folder size" option should be set to "Show number of
items"
2. The view mode can be any (Icons, Compact, or Details), but ensure that in
View → Show Additional Information, "Size" is selected to display the folder
sizes
3. Navigate to a directory containing a subdirectory with a very large number
of files (10,000-100,000+ files). To create such a directory one can use this
bash command:

   mkdir -p test_large_folder/large_subdir && cd test_large_folder/large_subdir
&& printf '%s\n' file_{1..50000}.txt | xargs touch

4. Refresh the view, for example pressing F5. It can be observed that the
folder's item count increases as dolphin counts them.
5. Refresh the view again before the counting process completes for that
folder.

OBSERVED RESULT
The folder that was interrupted during counting shows a higher number of items
than actually exists in the folder.

EXPECTED RESULT
Refreshing during an ongoing count operation should cancel the previous count,
resulting in the correct number of items being displayed once the new count
completes.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.9-201.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840HS with Radeon 780M Graphics
Memory: 32 GiB of RAM (30.5 GiB usable)
Graphics Processor 1: AMD Radeon 780M Graphics
Graphics Processor 2: NVIDIA GeForce RTX 4060 Laptop GPU 

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list