Bug 320473 - "Maintenance / Merge Duplicates" needs to handle two entries for same image correctly
Summary: "Maintenance / Merge Duplicates" needs to handle two entries for same image c...
Alias: None
Product: kphotoalbum
Classification: Unclassified
Component: general (show other bugs)
Version: 4.4
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
Depends on:
Blocks: 320635
  Show dependency treegraph
Reported: 2013-05-30 10:57 UTC by Martin Jost
Modified: 2013-06-15 19:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jost 2013-05-30 10:57:59 UTC
Most of my duplicates seem to be two entries in index.xml for the same photo. (Same complete path-name) This is probably from me messing with the file in an editor. (E.g. merging two independently edited/updated versions)
Would KPA handle this correctly at all ?
(Meaning discovering, that it is just one image and NOT trying to delete
"one of them" - meaning the only one in this case ?)

Should KPA show this differently, as just one line, noting that two
entries exist ? (Or even as two sections in the list)

Reproducible: Always

Steps to Reproduce:
Reproducible: Always Steps to Reproduce: Start "Maintenance / Merge Duplicates" with some duplicated entry in index.xml present
Actual Results:  
These who up in the same list and seem to be handled like two completely different photos.
I just tested (after backing up the affected photo):
KPA deleted the only photo present ! Bad !

Expected Results:  
a KPA needs to make sure, not to delete the only image present, when trying to "merge"
b It would be nice to have these entries "duplicates" marked differently in the list, e.g. as a two sublists for "real duplicates" (two different path names for the actual photo) <=> Only one path name

On 29. May 2013 Johannes Zarl <isilmendil@isilme.lupus.uberspace.de> announced this in mail thread "Re: [KPhotoAlbum] Maintenance / Merge duplicates" to have a look into this and asked for entry to be created in tracker
Comment 1 Johannes Zarl-Zierl 2013-06-02 21:14:10 UTC
Note: Two database entries to the same physical file can also occur due to symlinks in the file system (by linking a directory under a different name).

One option would be to have the following alternatives on merging:
 - Delete duplicate
 - Move duplicate to trash
 - Keep both files
   -> dependent checkbox: block duplicate from database (default: on)

When both entries have identical paths, these alternatives should be greyed out.
Comment 2 Johannes Zarl-Zierl 2013-06-02 21:18:58 UTC
Changing severity to normal ("This bugs makes a feature of the application unusable.")
Comment 3 Johannes Zarl-Zierl 2013-06-15 19:08:35 UTC
Git commit 6e5bb118bf972239724f1d809d0f66e63d75be85 by Johannes Zarl.
Committed on 15/06/2013 at 17:51.
Pushed by johanneszarl into branch 'master'.

DuplicateMerger: don't delete destination image.

When a duplicate is not a different file but just a duplicate entry in
the database, only remove the database entry, not the image file.

M  +9    -3    MainWindow/DuplicateMerger/DuplicateMatch.cpp