Bug 494096 - Dolphin generates lots of duplicate thumbnails in /tmp
Summary: Dolphin generates lots of duplicate thumbnails in /tmp
Status: RESOLVED DUPLICATE of bug 494061
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.6.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-04 09:17 UTC by Rikka
Modified: 2024-10-07 09:32 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rikka 2024-10-04 09:17:42 UTC
SUMMARY
Dolphin generates a large number of duplicate thumbnails in /tmp

STEPS TO REPRODUCE
1. Open /tmp in Dolphin
2. If there are some photos, Dolphin will generate thumbnails for it and then generate thumbnails for new thumbnails

OBSERVED RESULT
/tmp is filled with thumbnails

EXPECTED RESULT
Nothing happens

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3

ADDITIONAL INFORMATION
Video: https://pub-949ce129cfa3455d8b29dd4b0982f772.r2.dev/2024-10-04%2016-53-09.mkv
Comment 1 Harald Sitter 2024-10-04 12:09:42 UTC
Caused by the new external thumbnailer tech.

Since the path is /tmp the save conditional in ::saveThumbnailData doesn't bite and we keep generating new thumbnails. 

The fact that it keeps them around is bug #494061
Comment 2 Bug Janitor Service 2024-10-04 13:01:05 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:54 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 494061

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

*** This bug has been marked as a duplicate of bug 494061 ***