Bug 429102 - Trash does not show correct size when disk has less free space available than trash size
Summary: Trash does not show correct size when disk has less free space available than...
Status: REOPENED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Properties dialog (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-14 17:35 UTC by Claudius Ellsel
Modified: 2025-11-16 23:31 UTC (History)
2 users (show)

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


Attachments
Free space on root partition (2.02 KB, image/png)
2020-11-14 17:37 UTC, Claudius Ellsel
Details
Free space displayed for the trash (2.13 KB, image/png)
2020-11-14 17:38 UTC, Claudius Ellsel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Claudius Ellsel 2020-11-14 17:35:46 UTC
SUMMARY
This is somewhat related to https://bugs.kde.org/show_bug.cgi?id=426704.

STEPS TO REPRODUCE
1. Use Plasma with default settings
2. Fill the disk until less space is available than the trash size

OBSERVED RESULT
When on the trash page, dolphin shows all trash size as available space in trash.

EXPECTED RESULT
It should consider the already occupied space on the drive that will not be available for the trash.

This behavior might cause unexpected effects when a non default option for treating trash files when the trash is full is selected (like deleting them), although it might be impossible to get a full trash in this state.
Comment 1 Claudius Ellsel 2020-11-14 17:37:47 UTC
Created attachment 133335 [details]
Free space on root partition
Comment 2 Claudius Ellsel 2020-11-14 17:38:06 UTC
Created attachment 133336 [details]
Free space displayed for the trash
Comment 3 Christoph Feck 2020-12-01 12:51:42 UTC
Wait, does moving a file to trash actually copy the file? That itself would be a bug.
Comment 4 Claudius Ellsel 2020-12-01 13:00:36 UTC
Did you comment on the right bug? If yes, I don't understand what you mean with copy and how that is related to this report.
Comment 5 Christoph Feck 2020-12-01 15:55:15 UTC
Moving a file doesn't cause new block allocations, so the available space doesn't change. Copying does cause block allocations, and the size available for the trash would indeed need to take into account the available space for these.
Comment 6 Claudius Ellsel 2020-12-01 16:26:26 UTC
While writing my answer I finally got what you meant. I had the misconception that trashing files would occupy new space which is not true (and also solved for external drives recently). So the space is indeed displayed correctly.

If that is the case then https://bugs.kde.org/show_bug.cgi?id=426704 (where I got the inspiration from for this bug) has been wrongly addressed, correct?
Comment 7 Christoph Feck 2020-12-01 21:20:44 UTC
I am too tired to investigate/read properly, but if I understand this report correctly, it is NOTABUG.

The Trash size is a limit to avoid that all space is occupied by trashed files.
Imagine you have configured your Trash size to 100GB, with 12GB already used there. Disk has only 44GB space left. Now you are able to move an additional 88GB of files to the Trash, without changing the 44GB free space figure.
Comment 8 Christoph Feck 2020-12-01 21:25:30 UTC
Regarding bug 426704, you are probably correct that the fix is wrong.
Comment 9 Claudius Ellsel 2020-12-02 11:05:55 UTC
Agreed, so closing this bug.
Comment 10 villeneuve 2025-11-16 23:28:06 UTC
(In reply to Christoph Feck from comment #7)
> I am too tired to investigate/read properly, but if I understand this report
> correctly, it is NOTABUG.
> 
> The Trash size is a limit to avoid that all space is occupied by trashed
> files.
> Imagine you have configured your Trash size to 100GB, with 12GB already used
> there. Disk has only 44GB space left. Now you are able to move an additional
> 88GB of files to the Trash, without changing the 44GB free space figure.

Hi,
I don't get how this issue got closed by just ignoring the fact that this is very bad UI.

I just experienced this "bug", therefor searched for it and found this issue.

So what had happened: I deleted a bunch of stuff, than navigated to Trash in Dolphin, emptied Trash, looked at the bottom right, saw 90 GB free, began copying 80 GB, which failed, since the space that was really available on the harddrive was just about 50 GB.
Nobody I know ever cared about the available space in Trash and the space free display in Dolpin always shows just "xx GiB free" anywhere you navigate without ever telling the user *where* xx GiB are free despite that Dolphin is internally differentiating. So the solution is to either always show the pretty much only relevant figure, which is the space that's really free on the harddrive or change Dolphin's display so that it mentions "xx GiB free in Trash" or wherever or ideally it would always show two figures whenever the user navigates to a directory where two figures are relevant as in case of Trash.
Btw Krusader doesn't show any free space figure for Trash, which could be another solution Dolphin could adapt, since as already mentioned next to nobody cares about the space available in Trash AFAIK.
Comment 11 villeneuve 2025-11-16 23:31:42 UTC
Sorry, but I didn't find a way to edit my previous comment but I wanted to add that I only saw after posting that this bug was filed for frameworks-kio while I thought it would be about Dolphin. I lack the inside knowledge about KDE Plasma's construct so I don't know if this bug should be moved to Dolphin.