[Digikam-users] Save metadata to file break hard links

Anders Kamf digikam at kamf.se
Tue Jan 24 10:03:00 GMT 2012


Hi!

I wonder about the save operation when save metadata is activated in
the settings, like "Save image rating in metadata embedded in files"
etc.
I experience that when I e.g. change rating on a file, digiKam seems
to create a copy of the original file, then it moves all data from the
original file (and includes the new rating) to the copy and finally it
removes the now empty original file and replaces it with the copy
using the original name and timestamp. Can anyone confirm whether this
is intended behavior, and if so what is the purpose of this design?

The problem I have is that I store my photos as hard links, i.e. I
have them available on different places in the file system and I like
the metadata to be the same on all places (it's a hard link - it
should be the same file).
Example of 'ls -lh' before, during and after rating is changed on a
photo from inside digiKam:
 Before:
 -rwxrw-r-- 3 anders anders 2.3M 2008-10-23 16:12 IMG_1693.JPG

 During:
 -rwxrw-r-- 3 anders anders   0M 2012-01-24 10:41  IMG_1693.JPG
 -rwxrw-r-- 1 anders anders 2.3M 2012-01-24 10:41  IMG_1693.JPG61052

 After:
 -rwxrw-r-- 1 anders anders 2.3M 2008-10-23 16:12 IMG_1693.JPG

And the same listing on another place in the file system where a hard link is:
 Before:
 rwxrw-r-- 3 anders anders 2.3M 2008-10-23 16:12 IMG_1693.JPG

 After:
 -rwxrw-r-- 2 anders anders    0 2012-01-24 10:41 IMG_1693.JPG

Not only is the hard link broken, because digiKam empties the original
file, all other instances of the hard linked file are destroyed (I'm
left with empty files with "wrong" timestamp).


I run digiKam 1.2.0 on Ubuntu 10.04 with a local repository and also
digiKam 2.2.0 on Windows 7 with a Network Share collection (Samba
share on a Linux server), I experience the same behavior on both
places.

Anyone that has experienced the same thing or knows a solution?
Perhaps some setting that makes digiKam write directly into the file
instead of making a copy first?

Regards
Anders



More information about the Digikam-users mailing list