Bug 368104 - files/folders in trash get copied to /tmp while previews are generated
Summary: files/folders in trash get copied to /tmp while previews are generated
Status: REOPENED
Alias: None
Product: frameworks-kio
Classification: Unclassified
Component: general (show other bugs)
Version: 5.66.0
Platform: openSUSE RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL: http://bugzilla.opensuse.org/show_bug...
Keywords:
: 397165 415924 444349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-01 13:17 UTC by Wolfgang Bauer
Modified: 2022-01-09 17:16 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.89


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Bauer 2016-09-01 13:17:55 UTC
See also http://bugzilla.opensuse.org/show_bug.cgi?id=969768

If you open the trash in dolphin and hover over files/folders, they get copied to /tmp if previews are enabled (globally and for the corresponding filetype).

This is especially annoying if you happen to have large folders in the trash because previews for folders is turned on by default in default. And in this case, the files/folders in /tmp are not even deleted and even copied again every time you move the mouse over one.

The same happens in the file open/save dialog too.
Comment 1 Wolfgang Bauer 2016-09-01 13:19:04 UTC
I CC'ed the dolphin maintainers too, so that they know about the problem in case similar bug reports get filed against dolphin.
Comment 2 suse 2018-03-28 19:23:57 UTC
I can confirm mostly comment#1, but my test case is a little bit different.

Test case:
1. Five mpeg files trashed, each ~400-1200 MB.
2. go to trash:/ in dolphin.
3. Open a second dolphin window to see the free space information (of /tmp) in the status bar.
4. Turn on preview (in the first dolphin window).
5. All mpeg files will be copied sequentially to /tmp, preview generated and deleted afterwards.
6. You can watch the free space information going down and up dependent of the size of the trashed files.

Re-trigger the test case: (the preview pictures are cached.)
Restore the files, rename them and then start with #1 again.

Plasma: 5.12.3
Framework: 5.44.0
Application: 17.12.3
Comment 3 Jaime Torres 2018-04-26 08:22:20 UTC
Detailed code analysis:

In PreviewJobPrivate::getOrCreateThumbnail, as the KFileItem item localPath() is empty, the copy takes place.
And a KFileItem has localPath() empty if there is no KIO::UDSEntry::UDS_LOCAL_PATH in the UDSEntry.
Comment 4 Patrick Silva 2018-08-05 17:08:06 UTC
*** Bug 397165 has been marked as a duplicate of this bug. ***
Comment 5 Wolfgang Bauer 2020-01-25 12:28:54 UTC
*** Bug 415924 has been marked as a duplicate of this bug. ***
Comment 6 Philippe ROUBACH 2021-02-05 08:19:06 UTC
Please I get recently a non responded system due to a full / partition. Happily I get a backup system. I was able to repair /tmp.

kde apps 20.12.2
kde plasma 5.20.5
kde frameworks 5.78.0
qt 5.15.2

Please it's a 5 years old problem. Freezing your system is a blocking bug.
Comment 7 Patrick Silva 2021-10-25 00:01:29 UTC
*** Bug 444349 has been marked as a duplicate of this bug. ***
Comment 8 Eduardo Sánchez Muñoz 2021-10-25 17:04:00 UTC
I wonder why trash files are copied to /tmp to make the thumbnails. They are just regular files in ~/.local/share/Trash and they can be read without needing to copy them elsewhere.
Comment 9 Eduardo Sánchez Muñoz 2021-10-25 17:38:40 UTC
It created MR https://invent.kde.org/frameworks/kio/-/merge_requests/617 to fix this bug
Comment 10 Bug Janitor Service 2021-10-26 07:56:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/618
Comment 11 Bug Janitor Service 2021-10-26 07:56:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/618
Comment 12 Méven Car 2021-11-28 19:52:32 UTC
Git commit dedf0ee37f16c587826cf6ad9a6e6cec241a8d37 by Méven Car, on behalf of Eduardo Sánchez Muñoz.
Committed on 28/11/2021 at 19:46.
Pushed by meven into branch 'master'.

Do not create thumbnails when it requires to copy the file to /tmp

M  +5    -17   src/widgets/previewjob.cpp

https://invent.kde.org/frameworks/kio/commit/dedf0ee37f16c587826cf6ad9a6e6cec241a8d37
Comment 13 Patrick Silva 2021-12-04 11:40:28 UTC
The 'fix' seems a regresion to me. Now Trash does not generate any preview, what makes impossible to find the exact file I want to restore
when my Trash has lots of files with random names.
Comment 14 Eduardo Sánchez Muñoz 2021-12-04 15:59:14 UTC
I still think it is better than filling then RAM and crashing the whole OS.

There is https://invent.kde.org/frameworks/kio/-/merge_requests/618, which should bring back trash thumbnails without needing to copy anything to /tmp.
Comment 15 Kai Uwe Broulik 2021-12-11 11:44:20 UTC
Not just trash, I dont see any thumbnails on any remote location anymore.
Comment 16 Patrick Silva 2022-01-09 17:16:24 UTC
The 'fix' was reverted in frameworks 5.90 and this bug persists.