X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=backend%2Fev-attachment.c;h=7e7ca127ea0b35483179d555e11253c852db3b9e;hb=b62cd9e5c51ac21bde4a328c52f463913d84a1dc;hp=10982676644b615db56eb46d913e236670ed144d;hpb=d18bf1f949a0d4fb15b3bbd6daa6b8a59ebdc3f2;p=evince.git diff --git a/backend/ev-attachment.c b/backend/ev-attachment.c index 10982676..7e7ca127 100644 --- a/backend/ev-attachment.c +++ b/backend/ev-attachment.c @@ -22,6 +22,7 @@ #include #include #include +#include "ev-file-helpers.h" #include "ev-attachment.h" enum @@ -293,8 +294,7 @@ ev_attachment_save (EvAttachment *attachment, g_return_val_if_fail (uri != NULL, FALSE); result = gnome_vfs_create (&handle, uri, - GNOME_VFS_OPEN_WRITE | - GNOME_VFS_OPEN_TRUNCATE, + GNOME_VFS_OPEN_WRITE, FALSE, 0644); if (result != GNOME_VFS_OK) { g_set_error (error, @@ -390,7 +390,7 @@ ev_attachment_open (EvAttachment *attachment, } else { gchar *uri, *filename; - filename = g_build_filename (g_get_tmp_dir (), attachment->priv->name, NULL); + filename = g_build_filename (ev_tmp_dir (), attachment->priv->name, NULL); uri = g_filename_to_uri (filename, NULL, NULL); if (ev_attachment_save (attachment, uri, error)) {