From 67654fe8c933af2932e2c87ec2a4560cb064c545 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Wed, 15 Nov 2006 11:33:09 +0000 Subject: Use always ev_tmp_dir instead of g_get_tmp_dir. Fix a race condition in 2006-11-15 Carlos Garcia Campos * backend/Makefile.am: * backend/ev-attachment.c: (ev_attachment_open): * lib/ev-file-helpers.[ch]: (ensure_dir_exists), (ev_dot_dir), (ev_tmp_dir), (ev_tmp_filename): * shell/ev-sidebar-attachments.c: (ev_sidebar_attachments_drag_data_get): * shell/ev-window.c: (ev_window_clear_temp_file): Use always ev_tmp_dir instead of g_get_tmp_dir. Fix a race condition in ensure_dir_exists. Abort without crashing when we can't create user's directory. --- (limited to 'lib/ev-file-helpers.h') diff --git a/lib/ev-file-helpers.h b/lib/ev-file-helpers.h index 2cc817a..69ff83d 100644 --- a/lib/ev-file-helpers.h +++ b/lib/ev-file-helpers.h @@ -25,17 +25,19 @@ G_BEGIN_DECLS -const char *ev_dot_dir (void); +const gchar *ev_dot_dir (void); -void ev_file_helpers_init (void); +const gchar *ev_tmp_dir (void); -void ev_file_helpers_shutdown (void); +void ev_file_helpers_init (void); -gchar* ev_tmp_filename (void); +void ev_file_helpers_shutdown (void); -gboolean ev_xfer_uri_simple (const char *from, - const char *to, - GError **error); +gchar* ev_tmp_filename (void); + +gboolean ev_xfer_uri_simple (const char *from, + const char *to, + GError **error); G_END_DECLS -- cgit v0.9.1