GNOME Bugzilla – Bug 541616
file-roller puts temporary files in the home dir instead of /tmp
Last modified: 2020-11-11 19:11:29 UTC
Steps to reproduce: 1. Open a tarball with file-roller 2. Open a file within the archive without explicitly extracting it (such as by double clicking the file) 3. Notice that the file is extracted to a directory ~/.fr-* 4. Close file-roller. If you used file-roller's GUI to exit, the temporary file(s) and directory are deleted. However, if you kill it via SIGTERM or logout without exiting file-roller (I presume that sends either SIGTERM or SIGHUP), the temp files are left behind. There are two problems with this: 1. file-roller should clean up its temp files on exit, regardless of the exit method (with the obvious exception of SIGKILL, which can't be trapped). 2. The proper place for temporary files is /tmp. Dotfiles in $HOME are for program settings and the like. In the event that file-roller doesn't clean up its temp files, they just pollute $HOME and waste disk space. However, /tmp is cleaned on boot (or is it in shutdown?), so pollution and wasted disk space is minimized.
By the way, this bug was originally reported on Launchpad: https://bugs.launchpad.net/fileroller/+bug/245716
*** Bug 536846 has been marked as a duplicate of this bug. ***
$home is used because temp files can be very big and usually $home has more space than /tmp. Temporary files are deleted when file-roller exits.
Perhaps file-roller could check for available space in /tmp and use it if possible, falling back to $HOME if necessary. However, the biggest problem is that file-roller doesn't always clean up after itself. And in the case of large temp files, that's even more of a problem.
Another bug has been filed on Launchpad: https://bugs.launchpad.net/file-roller/+bug/883628 Moving the files to ~/.cache doesn't really solve the problem, as the reporter of this new bug notes. /tmp is the proper place for temporary files, as it gets cleaned whether or not file-roller cleans up after itself--and it's been demonstrated that it doesn't always do so. If there's insufficient space there, then of course a fallback approach is necessary. But such cases are likely rare.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time. If you still use file-roller and if you still see this bug / want this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/file-roller/-/issues/ Thank you for creating this report and we are sorry it could not be implemented (volunteer workforce and time is limited).