Summary: | Dolphin size column does not update for folders when a new file is created | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | j.mikkola |
Component: | view-engine: details mode | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | a.h.ismail.dev, akselmo, jjm, kfm-devel, nicolas.fella |
Priority: | NOR | ||
Version First Reported In: | 23.08.5 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/system/dolphin/-/commit/dd2cc41fdeed515f8b7921caa9da823e3cba424c | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
Screenshot of a folder wrongly shown contents
Screenshot phase 1 Screenshot phase 2 Screenshot phase 3 |
Description
j.mikkola
2025-02-21 04:06:27 UTC
Just checked: Properties/Alt+Return dialog shows the folder contents and, sometimes, after closing the sub folder contents MAY be updated. Created attachment 178679 [details]
Screenshot of a folder wrongly shown contents
Unless files named ~* (temporary, I guess) are not meant to be taken into account, looks like to be related to this issue.
A typo in earlier texts: "files or folders changed by other applications are not shown as changed" should be "files or folders changed by other applications are not ALWAYS shown as changed" I am not having the exact same bug, but I am setting this as confirmed. My repro steps: 1. Set view to details mode 2. Create folder structure such as foo/bar/baz 3. Create new text file to baz folder The dropdown arrow appears, but the Size column doesn't increase the file count for the folder(s). However, pressing F5, closing and opening Dolphin, navigating away from the view, etc. refresh the count. So I think what you're encountering is mostly fixed, there's just this one edge-case that still doesn't work in newer versions of Dolphin. dolphin 25.03.70 Operating System: Fedora Linux 41 KDE Plasma Version: 6.3.80 KDE Frameworks Version: 6.12.0 Qt Version: 6.8.2 Kernel Version: 6.12.15-200.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 3600 6-Core Processor Memory: 15.5 GiB of RAM Graphics Processor: AMD Radeon RX 6600 Created attachment 178687 [details]
Screenshot phase 1
No F5 used at this stage.
Created attachment 178688 [details]
Screenshot phase 2
Middle-click on "level0" folder icon .
Created attachment 178689 [details]
Screenshot phase 3
Middle-click on phase 2 "l2" folder icon. Text file created with Kate after tree creation.
After the phases F5 repairs the folders' content indication. Not sure if these will bring anything new into the subject, though... -just checked the results if I do something similar A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/930 *** Bug 501248 has been marked as a duplicate of this bug. *** Git commit dd2cc41fdeed515f8b7921caa9da823e3cba424c by Akseli Lahtinen. Committed on 13/03/2025 at 12:26. Pushed by akselmo into branch 'master'. KFileItemModelRolesUpdater: reset size and count before updating folders Folder count would not update properly when user would delete file from a folder, or add a new file to it. Previously when size value is set to -2 after update, the update will never be called again unless user presses F5. This change will instead reset that -2 to 0 whenever we are requesting for calculating directory sizes. We never updated the count when a file was deleted, so that has been added as well. This change also calculates the item counts from the processedAmount, which is the total amount of items we're processing. From there we remove the unwanted items and get the final count. For remote files, we set the count to -1 since we don't calculate them. M +58 -7 src/kitemviews/kfileitemmodelrolesupdater.cpp M +4 -0 src/kitemviews/kfileitemmodelrolesupdater.h https://invent.kde.org/system/dolphin/-/commit/dd2cc41fdeed515f8b7921caa9da823e3cba424c (In reply to Akseli Lahtinen from comment #11) > Git commit dd2cc41fdeed515f8b7921caa9da823e3cba424c by Akseli Lahtinen. > Committed on 13/03/2025 at 12:26. > Pushed by akselmo into branch 'master'. > > KFileItemModelRolesUpdater: reset size and count before updating folders > > Folder count would not update properly when user would delete file from > a folder, or add a new file to it. > > Previously when size value is set to -2 after update, the update will > never be called again unless user presses F5. This change will instead > reset that -2 to 0 whenever we are requesting for calculating > directory sizes. > > We never updated the count when a file was deleted, so that has been added > as well. > > This change also calculates the item counts from the processedAmount, which > is the total amount of items we're processing. From there we remove the > unwanted items and get the final count. > > For remote files, we set the count to -1 since we don't calculate them. > > M +58 -7 src/kitemviews/kfileitemmodelrolesupdater.cpp > M +4 -0 src/kitemviews/kfileitemmodelrolesupdater.h > > https://invent.kde.org/system/dolphin/-/commit/ > dd2cc41fdeed515f8b7921caa9da823e3cba424c I tried on Both Fedora 41 (Dolphin 24.12.3) and Debian unstable (25.03.90-1) with the latest upstream release and the bug is still there. Did I miss something or the patch wasn't integrated into the latest release? (In reply to A. Ismail from comment #12) > I tried on Both Fedora 41 (Dolphin 24.12.3) and Debian unstable (25.03.90-1) > with the latest upstream release and the bug is still there. Did I miss > something or the patch wasn't integrated into the latest release? Nevermind I checked Dolphin's code used in Debian sid and it doesn't have the patch so it is a Debian problem. |