diff options
author | Juanjo MarĂn <juanj.marin@juntadeandalucia.es> | 2009-05-17 13:22:31 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@yandex.ru> | 2009-05-17 13:22:31 (GMT) |
commit | 418246aaa10bc512aa310cb3b3aa82b6c4aeb13b (patch) | |
tree | 90e9e0349c9d60f3d9e7e668990bb2eaa0d0ff44 /libdocument | |
parent | 7a50118117bf029d8b73bc85221cb5ab06b2510c (diff) |
[comics] Fixes handling of the tmp folder
Uses common function for a temporary file creation. Fixes crash in
GNOME bug #582108.
Diffstat (limited to 'libdocument')
-rw-r--r-- | libdocument/ev-file-helpers.c | 6 | ||||
-rw-r--r-- | libdocument/ev-file-helpers.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c index 67e884a..3da4a59 100644 --- a/libdocument/ev-file-helpers.c +++ b/libdocument/ev-file-helpers.c @@ -122,6 +122,12 @@ ev_tmp_filename (const gchar *prefix) return filename; } +gchar * +ev_tmp_directory (const gchar *prefix) +{ + return ev_tmp_filename (prefix ? prefix : "directory"); +} + /* Remove a local temp file created by evince */ void ev_tmp_filename_unlink (const gchar *filename) diff --git a/libdocument/ev-file-helpers.h b/libdocument/ev-file-helpers.h index adec69c..47a5417 100644 --- a/libdocument/ev-file-helpers.h +++ b/libdocument/ev-file-helpers.h @@ -47,6 +47,7 @@ gboolean ev_dir_ensure_exists (const gchar *dir, GFile *ev_tmp_file_get (const gchar *prefix); gchar *ev_tmp_filename (const char *prefix); +gchar *ev_tmp_directory (const char *prefix); void ev_tmp_filename_unlink (const gchar *filename); void ev_tmp_file_unlink (GFile *file); void ev_tmp_uri_unlink (const gchar *uri); |