tumbler leaves empty files in /tmp
OS: Xubuntu 20.04.4
Xfce: 4.14
tumbler: 0.2.8
/tmp
has been filling up with files named tumbler-*.png
due to desktop-thumbnailer not cleaning resources on failure.
Reproduction
- Create a thumbnailer that returns an error. Here, I'm creating a handler for
video/mp4
:
~/.local/share/thumbnailers/bug.thumbnailer
:
[Thumbnailer Entry]
Exec=/usr/bin/false
MimeType=video/mp4
- Ensure tumbler picks up the change and clear the cache:
pkill tumblerd; find ~/.cache/thumbnails/ -type f -delete
- Open a folder in Thunar with an mp4
or use ffmpeg -f lavfi -i color=size=320x240:duration=10:rate=25 output.mp4
to create a blank mp4 file.
- Observe leftover
/tmp/tumbler-*.png
files.
Cause
Relevant source file:
tmpfile
is only cleaned up on success, not on failure.
I believe (though haven't verified) that this bug is still present in the latest version as it does not look fixed in the master
branch.