[evince] [libdocument] Use g_file_replace() when saving attachments



commit 9cea7543efb218a7a71097fa78e1841cab1e95af
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Mon Nov 16 12:50:14 2009 +0100

    [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().

 libdocument/ev-attachment.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libdocument/ev-attachment.c b/libdocument/ev-attachment.c
index c4dd38d..b792b5f 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;
 		



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]