diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-sidebar-attachments.c | 3 | ||||
-rw-r--r-- | shell/ev-window.c | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/shell/ev-sidebar-attachments.c b/shell/ev-sidebar-attachments.c index 4bdf5d9..e735b13 100644 --- a/shell/ev-sidebar-attachments.c +++ b/shell/ev-sidebar-attachments.c @@ -31,6 +31,7 @@ #include <string.h> #include <libgnomeui/gnome-icon-lookup.h> +#include "ev-file-helpers.h" #include "ev-sidebar-attachments.h" #include "ev-sidebar-page.h" @@ -409,7 +410,7 @@ ev_sidebar_attachments_drag_data_get (GtkWidget *widget, COLUMN_ATTACHMENT, &attachment, -1); - filename = g_build_filename (g_get_tmp_dir (), + filename = g_build_filename (ev_tmp_dir (), ev_attachment_get_name (attachment), NULL); diff --git a/shell/ev-window.c b/shell/ev-window.c index c803140..436096c 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -994,7 +994,7 @@ ev_window_clear_temp_file (EvWindow *ev_window) { GnomeVFSURI *uri; gchar *filename; - gchar *dir; + const gchar *tempdir; if (!ev_window->priv->uri) return; @@ -1010,12 +1010,11 @@ ev_window_clear_temp_file (EvWindow *ev_window) if (!filename) return; - dir = g_path_get_dirname (filename); - if (g_ascii_strcasecmp (dir, g_get_tmp_dir ()) == 0) { + tempdir = g_get_tmp_dir (); + if (g_ascii_strncasecmp (filename, tempdir, strlen (tempdir)) == 0) { g_unlink (filename); } - g_free (dir); g_free (filename); } |