From: Carlos Garcia Campos Date: Mon, 16 Nov 2009 11:50:14 +0000 (+0100) Subject: [libdocument] Use g_file_replace() when saving attachments X-Git-Tag: EVINCE_2_29_2~7 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=9cea7543efb218a7a71097fa78e1841cab1e95af;p=evince.git [libdocument] Use g_file_replace() when saving attachments It was broken since the temp files handling rework, because temp files are now created by ev_mkstemp_file(). --- diff --git a/libdocument/ev-attachment.c b/libdocument/ev-attachment.c index c4dd38d7..b792b5ff 100644 --- a/libdocument/ev-attachment.c +++ b/libdocument/ev-attachment.c @@ -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;