https://bugs.kde.org/show_bug.cgi?id=528198
Bug ID: 528198
Summary: Folder file/folder counter never includes hidden items
Classification: Applications
Product: dolphin
Version First 26.08.2
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
DESCRIPTION
Since the latest dolphin and kio update the counter showing number of files and
folders inside a folder doesn't include hidden items even with the 'Show hidden
files' toggle enabled.
STEPS TO REPRODUCE
1. Have a folder with some hidden items inside
2. Enable 'Size' display in additional properties and set its view mode to
'Show number of items' in View -> Content display
3. Enable 'Show hidden'
3. Observe the wrong count of items displayed
OBSERVED RESULT
The counter should include all the files/folders
EXPECTED RESULT
The counter never includes hidden files/folders
SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.8.0
KDE Frameworks Version: 6.31.0
Qt Version: 6.12.0
Kernel Version: 7.2.11-1-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 64 GiB of RAM (62.7 GiB usable)
ADDITIONAL INFORMATION
I did some investigation and came up with this fix:
```
// Use KIO flags to exclude dot entries at the source to simplify
counting
KIO::ListJob::ListFlags flags =
KIO::ListJob::ListFlag::ExcludeDotAndDotDot;
if (!m_model->showHiddenFiles()) {
flags |= KIO::ListJob::ListFlag::ExcludeHidden;
} else {
flags |= KIO::ListJob::ListFlag::IncludeHidden;
}
```
instead of
```
// Use KIO flags to exclude dot entries at the source to simplify
counting
KIO::ListJob::ListFlags flags =
KIO::ListJob::ListFlag::ExcludeDotAndDotDot;
if (!m_model->showHiddenFiles()) {
flags |= KIO::ListJob::ListFlag::ExcludeHidden;
}
```
in
src/kitemviews/kfileitemmodelrolesupdater.cpp
Looks like newer kio versions hide hidden files by default
--
You are receiving this mail because:
You are watching all bug changes.