diff options
author | Christian Persch <chpe@gnome.org> | 2009-10-25 18:55:18 (GMT) |
---|---|---|
committer | Christian Persch <chpe@gnome.org> | 2009-10-25 18:55:18 (GMT) |
commit | a55cbf9e9f250fe6ba6ac2bbd6862b5520941c7d (patch) | |
tree | 3922e851b9066bf7d6180f1a6cbecbaaa1f4218c | |
parent | 1c3a2e3cd2fdb1ffddb4727549c8e4cc749a0499 (diff) |
[libdocument] Remove ev_tmp_dir()
All access to the tmp dir should be through ev_mkstemp[_file]() and
ev_mkdtemp() now.
-rw-r--r-- | libdocument/ev-file-helpers.c | 14 | ||||
-rw-r--r-- | libdocument/ev-file-helpers.h | 6 |
2 files changed, 7 insertions, 13 deletions
diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c index 4816db0..3845519 100644 --- a/libdocument/ev-file-helpers.c +++ b/libdocument/ev-file-helpers.c @@ -33,7 +33,7 @@ static gchar *tmp_dir = NULL; -/** +/* * ev_dir_ensure_exists: * @dir: the directory name * @mode: permissions to use when creating the directory @@ -43,10 +43,10 @@ static gchar *tmp_dir = NULL; * * Returns: %TRUE on success, or %FALSE on error with @error filled in */ -gboolean -ev_dir_ensure_exists (const gchar *dir, - int mode, - GError **error) +static gboolean +_ev_dir_ensure_exists (const gchar *dir, + int mode, + GError **error) { int errsv; char *display_name; @@ -79,7 +79,7 @@ ev_dir_ensure_exists (const gchar *dir, * Returns: the tmp directory, or %NULL with @error filled in if the * directory could not be created */ -const char * +static const char * _ev_tmp_dir (GError **error) { @@ -92,7 +92,7 @@ _ev_tmp_dir (GError **error) g_free (dirname); } - if (!ev_dir_ensure_exists (tmp_dir, 0700, error)) + if (!_ev_dir_ensure_exists (tmp_dir, 0700, error)) return NULL; return tmp_dir; diff --git a/libdocument/ev-file-helpers.h b/libdocument/ev-file-helpers.h index 99df4ed..2ab309d 100644 --- a/libdocument/ev-file-helpers.h +++ b/libdocument/ev-file-helpers.h @@ -36,16 +36,10 @@ typedef enum { EV_COMPRESSION_GZIP } EvCompressionType; -const char *_ev_tmp_dir (GError **error); - void _ev_file_helpers_init (void); void _ev_file_helpers_shutdown (void); -gboolean ev_dir_ensure_exists (const gchar *dir, - int mode, - GError **error); - int ev_mkstemp (const char *template, char **file_name, GError **error); |