After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625216 - Crash on Import when XMP sidecar file exists already
Crash on Import when XMP sidecar file exists already
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Import
GIT
Other Linux
: Normal normal
: 0.7.2
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-25 06:52 UTC by Paul Wellner Bou
Modified: 2010-08-02 13:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't crash if XMP already exists. (1.26 KB, patch)
2010-08-02 13:18 UTC, Ruben Vermeersch
committed Details | Review

Description Paul Wellner Bou 2010-07-25 06:52:07 UTC
Unhandled Exception: GLib.GException: Error opening file '/home/paul/Photos/2010/07/17/DSC_6300.xmp': File exists
  at GLib.FileAdapter.Copy (File destination, FileCopyFlags flags, GLib.Cancellable cancellable, GLib.FileProgressCallback progress_callback) [0x00000] 
  at FSpot.Import.ImportController.CopyIfNeeded (IBrowsableItem item, Hyena.SafeUri destination) [0x000ba] in /usr/src/f-spot/src/Import/ImportController.cs:390 
  at FSpot.Import.ImportController.ImportPhoto (IBrowsableItem item, FSpot.Roll roll) [0x00025] in /usr/src/f-spot/src/Import/ImportController.cs:345 
  at FSpot.Import.ImportController.DoImport () [0x000f0] in /usr/src/f-spot/src/Import/ImportController.cs:264
Comment 1 Paul Wellner Bou 2010-07-29 11:58:12 UTC
By the way, the crash on importing even if no xmp existed previously is caused when importing RAW+JPG, as the same XMP filename is used. F-Spot creates an xmp for the first file, and when importing the second one, the xmp exists already.

This can only be avoided by changing the sidecar preference on importing.
Comment 2 Ruben Vermeersch 2010-08-02 13:18:38 UTC
Created attachment 166975 [details] [review]
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.
Comment 3 Ruben Vermeersch 2010-08-02 13:18:57 UTC
Attachment 166975 [details] pushed as 362e6b4 - Don't crash if XMP already exists.