Bug 494061 - Dolphin spam creating images in /tmp/
Summary: Dolphin spam creating images in /tmp/
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.6.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 494096 494345 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-10-03 19:17 UTC by dofficialgman
Modified: 2024-10-10 15:49 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dofficialgman 2024-10-03 19:17:13 UTC
SUMMARY
Opening dolphin with a folder that has an image in it (png/jpg/etc) causes the /tmp folder to get floodded with hundreds/thousands of images that look the same as the one in the previously previewed folder

STEPS TO REPRODUCE
1. Open dolphin
2. navigate to a path with pictures
3. observe /tmp/ getting flooded with images with the name pattern dolphin-XXXXXXXXXXXXX.png (or similar)

OBSERVED RESULT
/tmp/ flooded with images

EXPECTED RESULT
/tmp/ not flooded with imagse

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 24.04
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Comment 1 Harald Sitter 2024-10-04 12:10:53 UTC
Caused by the new external thumbnailer tech.

We never delete the temp files after they were created and consumed. There are some other problems with using /tmp though so I think it best if we either move to .cache/thumbnail/tmp or XDG_RUNTIME_DIR.
Comment 2 Bug Janitor Service 2024-10-04 13:01:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1728
Comment 3 Akseli Lahtinen 2024-10-04 14:31:46 UTC
Git commit 9f3d680248ab863faa97decff289babd6b34252b by Akseli Lahtinen.
Committed on 04/10/2024 at 14:31.
Pushed by akselmo into branch 'master'.

previewjob: Use .cache as temp folder, delete temp file after use

Current solution moves items into `/tmp/` which is not good, since
any user can see thumbnail images from there. The files
are also not deleted after the image is generated.

This moves the tmp files into `~/.cache/thumbnails/size/tmp/` and
then when the thumbnailer is done, the file is removed.

We also do not use standard thumbnailers if caching is turned off, since we
do not have thumbnail folder in the first place, and the thumbnailers rely on that.
Related: bug 494096

M  +11   -3    src/gui/previewjob.cpp

https://invent.kde.org/frameworks/kio/-/commit/9f3d680248ab863faa97decff289babd6b34252b
Comment 4 Méven Car 2024-10-07 09:32:05 UTC
*** Bug 494096 has been marked as a duplicate of this bug. ***
Comment 5 Akseli Lahtinen 2024-10-10 15:43:58 UTC
*** Bug 494345 has been marked as a duplicate of this bug. ***
Comment 6 Akseli Lahtinen 2024-10-10 15:48:55 UTC
Should be fixed in frameworks 6.7.0 with https://invent.kde.org/frameworks/kio/-/commit/9f3d680248ab863faa97decff289babd6b34252b