[gcab] gcab: replace existing file



commit aec4b8bb03cb0fb9aaa44697ecee91d8cf3c9e86
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Fri Dec 14 15:35:23 2012 +0100

    gcab: replace existing file

 gcab.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gcab.c b/gcab.c
index d18d267..a1a602d 100644
--- a/gcab.c
+++ b/gcab.c
@@ -114,7 +114,8 @@ main (int argc, char *argv[])
         gcab_error ("No files to be archived.");
 
     GFile *outputfile = g_file_new_for_commandline_arg (args[0]);
-    GOutputStream *output = G_OUTPUT_STREAM (g_file_create (outputfile, 0, NULL, &error));
+    GOutputStream *output = G_OUTPUT_STREAM (g_file_replace (outputfile, NULL, FALSE,
+                                                             0, NULL, &error));
     if (error)
         gcab_error ("Can't create cab file %s: %s", args[0], error->message);
 



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