GNOME Bugzilla – Bug 672939
add API to retrieve tempdir for big/semi-persistent files
Last modified: 2012-07-06 02:43:14 UTC
https://fedoraproject.org/wiki/Features/tmp-on-tmpfs says that one shouldn't store big files and semi-persistent stuff in /tmp, but instead use /var/tmp. IRC discussion with mezcalero came to these conclusions: - g_get_tmp_dir() should continue to point to /tmp and take $TMPDIR into account - instead of hardcoding /var/tmp, there should be API to retrieve the path, taking into account some yet-to-be-defined env var to make it relocatable
See also: http://0pointer.de/blog/projects/tmp.html
Any suggestion for a name ? g_get_var_tmp_dir() ?
How about g_get_system_cache_dir() analogous to g_get_user_cache_dir(). Both are persistent across reboots and not fully featured. An XDG_CACHE_DIR couldbe introduced to re-define it.
Bug 677272 has more comprehensive discussion, so duping this bug there *** This bug has been marked as a duplicate of bug 677272 ***