Bug 426704 - Properties dialog shows wrong free space for unlimited Trash
Summary: Properties dialog shows wrong free space for unlimited Trash
Status: ASSIGNED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Properties dialog (show other bugs)
Version: git master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-19 00:09 UTC by Patrick Silva
Modified: 2022-04-25 12:30 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.76


Attachments
screenshot (150.95 KB, image/png)
2020-09-19 00:09 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-09-19 00:09:05 UTC
Created attachment 131756 [details]
screenshot

STEPS TO REPRODUCE
1. disable size limit in Trash section of Dolphin settings
2. open Trash and press alt+return to open Properties dialog
3. 

OBSERVED RESULT
properties dialog wrongly indicates that free space of Trash equals root partition size

EXPECTED RESULT
free space of Trash should equal free space of root partition

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.90
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Comment 1 Bug Janitor Service 2020-10-09 09:12:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/156
Comment 2 David Faure 2020-10-10 16:12:52 UTC
Git commit c6f0c8b856e6183c625e0526ddc3a8c64ecd558e by David Faure, on behalf of Ahmad Samir.
Committed on 10/10/2020 at 16:12.
Pushed by dfaure into branch 'master'.

kio_trash: fix the logic when no size limit is set

If a size limit is set, we use that to calculate the percent of the total
partition size that trash can use; however if the size limit isn't set,
then the available free space on the partition is the limit.

Thanks to Patrick Silva for figuring it out in the bug report.
FIXED-IN: 5.76

M  +8    -1    src/ioslaves/trash/discspaceutil.cpp
M  +6    -0    src/ioslaves/trash/discspaceutil.h
M  +3    -0    src/ioslaves/trash/trashimpl.cpp

https://invent.kde.org/frameworks/kio/commit/c6f0c8b856e6183c625e0526ddc3a8c64ecd558e
Comment 3 Claudius Ellsel 2020-11-14 17:40:57 UTC
While this is probably fixed, a pretty similar bug is still there: https://bugs.kde.org/show_bug.cgi?id=429102.
Comment 4 Claudius Ellsel 2020-12-01 16:28:25 UTC
I think this might have been wrongly fixed. See the discussion in https://bugs.kde.org/show_bug.cgi?id=429102. Trashing files won't occupy additional space (for most times) and thus trash size doen't correlate with free disk space.
Comment 5 Bug Janitor Service 2020-12-02 11:09:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/239
Comment 6 Ahmad Samir 2020-12-02 23:53:39 UTC
Indeed moving files to trash wouldn't use extra space, I didn't think of that when I submitted that MR...
Comment 7 Claudius Ellsel 2020-12-03 14:18:47 UTC
I guess almost nobody thought of that :) It is not intuitive.
Comment 8 tomashnyk 2022-04-25 12:30:35 UTC
What is the design for this? My trash says something like 880 Gb of free space, yet my 1TB disk is almost 97% full. As I user, I am confused by this. I expected the free space on disk to be displayed - but if I understand it correctly, that is reported by partition, and trash is common for all partitions, so it is not clear which partition should be reported when viewing trash. To me it would make sense if it rather displayed nothing  (maybe explaining "trahs size unlimited" or something like that.