[libgrss] feeds-group: Overwrite export file destination



commit 2f637c45673d3a684d3ad8c735e30386b2547a24
Author: Felipe Borges <felipeborges gnome org>
Date:   Mon Feb 27 16:08:25 2017 +0100

    feeds-group: Overwrite export file destination
    
    grss_feeds_group_export_file should overwrite existing file, instead
    of appending the FeedsChannel list to it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779316

 src/feeds-group.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/feeds-group.c b/src/feeds-group.c
index 20a3893..b057aeb 100644
--- a/src/feeds-group.c
+++ b/src/feeds-group.c
@@ -273,7 +273,7 @@ grss_feeds_group_export_file (GrssFeedsGroup *group, GList *channels, const gcha
                        }
 
                        file = g_file_new_for_uri (uri);
-                       stream = g_file_append_to (file, G_FILE_CREATE_NONE, NULL, &err);
+                       stream = g_file_replace (file, NULL, TRUE, G_FILE_CREATE_REPLACE_DESTINATION, NULL, 
&err);
 
                        if (stream == NULL) {
                                g_propagate_error (error, err);


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