Bug 469598 - The "Delete Oldest Files From Trash" option does nothing
Summary: The "Delete Oldest Files From Trash" option does nothing
Status: REOPENED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Trash (other bugs)
Version First Reported In: 6.10.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Pan Zhang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-10 19:34 UTC by Antti Savolainen
Modified: 2025-11-07 06:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.19
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Savolainen 2023-05-10 19:34:42 UTC
Demonstrative video: https://youtu.be/LXIqVJu61v4

SUMMARY
All of the options only show a warning and require a manual intervention by emptying the trash. This also applies to the "Delete Biggest Files From Trash" option.

STEPS TO REPRODUCE
1. Set "Delete Oldest Files From Trash" option for trash
2. Try to trash files past the trash size limit

OBSERVED RESULT
A warning is shown

EXPECTED RESULT
The olders/biggest file should be deleted from trash and the new file put into trash without a warning

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Comment 1 Bug Janitor Service 2025-09-25 09:23:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2006
Comment 2 Pan Zhang 2025-09-26 01:04:11 UTC
I reproduced this issue on the master branch, and I’ve already fixed it and submitted a merge request.
MR:https://invent.kde.org/frameworks/kio/-/merge_requests/2006
Comment 3 Méven 2025-09-28 12:17:08 UTC
Git commit eb85a1ee051565a79b63b5b1dc65a8300d9080a6 by Méven Car, on behalf of Pan Zhang.
Committed on 28/09/2025 at 12:17.
Pushed by meven into branch 'master'.

trashimpl: Fix size limit check to allow automatic deletion

Previously adaptTrashSize() rejected new files whenever 'partitionSize + additionalSize' exceeded the limit, even if removing older/bigger files could make enough room. Now we only reject when the new file itself is larger than the maximum allowed trash size, so the cleanup policy (delete oldest / biggest) works as intended.

M  +4    -3    src/kioworkers/trash/trashimpl.cpp

https://invent.kde.org/frameworks/kio/-/commit/eb85a1ee051565a79b63b5b1dc65a8300d9080a6
Comment 4 Antti Savolainen 2025-11-07 06:10:53 UTC
The setting still does nothing.
Demonstrative video: https://youtu.be/MHMXGjJSh0A

As far as I understand it, this was supposed to be fixed in Frameworks 6.19

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-7600U CPU @ 2.80GHz
Memory: 24 GiB of RAM (23.2 GiB usable)
Graphics Processor: Intel® HD Graphics 620
Manufacturer: LENOVO
Product Name: 20HG0003SG
System Version: ThinkPad T470s