]> www.fi.muni.cz Git - evince.git/commitdiff
[libdocument] Use g_file_replace() when saving attachments
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 16 Nov 2009 11:50:14 +0000 (12:50 +0100)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 16 Nov 2009 13:28:49 +0000 (14:28 +0100)
It was broken since the temp files handling rework, because temp files
are now created by ev_mkstemp_file().

libdocument/ev-attachment.c

index c4dd38d7addb4937a074ec070d96034e3838864f..b792b5ff932761f4ea2ac8cef41178d74faca559 100644 (file)
@@ -293,7 +293,7 @@ ev_attachment_save (EvAttachment *attachment,
        g_return_val_if_fail (EV_IS_ATTACHMENT (attachment), FALSE);
        g_return_val_if_fail (G_IS_FILE (file), FALSE);
 
-       output_stream = g_file_create (file, 0, NULL, &ioerror);
+       output_stream = g_file_replace (file, NULL, FALSE, 0, NULL, &ioerror);
        if (output_stream == NULL) {
                char *uri;