Bug 422112 - XMP file moves end up as inconsistent if an xmp file already exists at destination
Summary: XMP file moves end up as inconsistent if an xmp file already exists at destin...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Sidecar (show other bugs)
Version: 7.0.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-26 19:18 UTC by griffiths_andy
Modified: 2020-07-25 14:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description griffiths_andy 2020-05-26 19:18:24 UTC
SUMMARY

7.0.0-rc http://commits.kde.org/digikam/5c08af48ee59836d3bc89aa30197fe92d43f2caf

I had an 'empty' album (folder count = 0) which I moved some raw & xmp files into using Digikam. As I did so I got a message about existing files being present in the destination album. 

There were existing xmp files with the same names in the destination which were not overwritten with the correct ones from the source album. This was due to previous moves of the raw files outside of digikam which didn't account for the sidecars properly.

The correct xmp files were left in the source album, which now had a folder count = 0

This had the potential for me to lose the correct xmp files. I tested this as follows with empty xmp files in the destination

STEPS TO REPRODUCE
1. Create a test album, and a sub-album, and setup the files as follows:

cp CRW_3567.CRW CRW_3567.xmp xmpsource/
touch xmpdest/CRW_3567.xmp

./xmpsource:
total 8268
-rwxr-xr-x 1 andyg andyg 8455952 Aug 13  2015 CRW_3567.CRW
-rwxr-xr-x 1 andyg andyg    2402 Feb 28  2016 CRW_3567.xmp

./xmpdest:
total 0
-rw-r--r-- 1 andyg andyg 0 May 26 19:53 CRW_3567.xmp

2. In digikam move the picture from xmpsource to xmpdest. Get a message re. duplicate files 
3. Check result:

./xmpsource:
total 8
-rwxr-xr-x 1 andyg andyg 2402 Feb 28  2016 CRW_3567.xmp

./xmpdest:
total 8260
-rwxr-xr-x 1 andyg andyg 8455952 Aug 13  2015 CRW_3567.CRW
-rw-r--r-- 1 andyg andyg       0 May 26 19:53 CRW_3567.xmp

OBSERVED RESULT
The raw file is now associated with an empty xmp file. If I was to delete xmpsource (as I now see count = 0 and didn't know any better) I lose my xmp data. This could potentially be a problem for other sidecar files also. 

EXPECTED RESULT
Either the destination 'rogue' xmp should be overwritten, or there should be some sort of warning dialog allowing proper management eg. skip, overwrite, of the main file and all associated sidecars, preferably with some sort of thumbnail preview of source and destination conflict if available. I'm aware this touches on the greater question of overwrite management, but I feel it needs addressing.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2020-05-26 19:38:01 UTC

*** This bug has been marked as a duplicate of bug 381625 ***
Comment 2 caulier.gilles 2020-07-25 14:34:49 UTC
Fixed with #381625