[f-spot] Don't crash if XMP already exists.



commit 362e6b4809cf776ab9de62ded59367cabda6ac12
Author: Ruben Vermeersch <ruben savanne be>
Date:   Mon Aug 2 15:17:28 2010 +0200

    Don't crash if XMP already exists.
    
    In the RAW + JPEG case, an XMP file might already exist. With this
    commit, it will get overwritten. As both files originate from the same
    photo, this should not be a problem though.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=625216

 src/Import/ImportController.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Import/ImportController.cs b/src/Import/ImportController.cs
index 21e0bfc..0abf1c9 100644
--- a/src/Import/ImportController.cs
+++ b/src/Import/ImportController.cs
@@ -387,7 +387,7 @@ namespace FSpot.Import
             if (xmp_file.Exists) {
                 var xmp_destination = destination.ReplaceExtension (".xmp");
                 var new_xmp_file = GLib.FileFactory.NewForUri (xmp_destination);
-                xmp_file.Copy (new_xmp_file, GLib.FileCopyFlags.AllMetadata, null, null);
+                xmp_file.Copy (new_xmp_file, GLib.FileCopyFlags.AllMetadata | GLib.FileCopyFlags.Overwrite, null, null);
                 copied_files.Add (xmp_destination);
                 original_files.Add (xmp_original);
             }



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