Bug 199625

Summary: exif db error when finding new images
Product: [Applications] kphotoalbum Reporter: Matthias Füssel <mat.fuessel>
Component: generalAssignee: KPhotoAlbum Bugs <kpabugs>
Status: RESOLVED FIXED    
Severity: normal CC: blackie
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Unspecified   
Latest Commit: Version Fixed In:
Attachments: fix for exif db update

Description Matthias Füssel 2009-07-10 01:50:26 UTC
Version:           4 (using KDE 4.2.90)
Installed from:    SuSE RPMs

For every new image that KPhotoAlbum finds it displays an error dialog complaining that some constraint in the exif database has been violated by the insert.
Comment 1 Matthias Füssel 2009-07-10 01:56:47 UTC
Actually I use the current KPhotoAlbum version from trunk, this stupid wizard thing didn't let me select it.
Comment 2 Matthias Füssel 2009-07-10 02:06:34 UTC
Created attachment 35210 [details]
fix for exif db update

Newly encountered images are inserted twice into the exif db (in ImageInfoPtr NewImageFinder::loadExtraFile: once indirectly by new ImageInfo(...) and once explicitly later). This triggers the primary key constraint on filename.

This patch removes the second insert attempt. It also makes ImageInfo::readExif(...) remove any possible old entry before adding the new one, in case it is indeed an update operation, as the mode "EXIFMODE_DATABASE_UPDATE" implies...
Comment 3 Jesper Pedersen 2009-07-12 18:55:36 UTC
commit 995412