[Digikam-devel] [Bug 140175] New: mishandling of symbolic links

Pedro Venda pjlv at mega.ist.utl.pt
Tue Jan 16 22:43:28 GMT 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=140175         
           Summary: mishandling of symbolic links
           Product: digikam
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel kde org
        ReportedBy: pjlv mega ist utl pt


Version:           0.9.1-svn (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3)
 CFLAGS="-march=pentium-m -mtune=pentium-m -mmmx -msse -msse2 -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -O2 -pipe"
OS:                Linux

I'm creating sub-albums of my main albums where I symlink the files 
corresponding to my selected pictures to geotag and comment and later to publish on the web. So far it works well: digikam displays the pictures (symlinks) correctly in the sub-album and if I change the picture in the main album, it shows up changed in the sub album.

The issue is doing it the other way around: changing pictures in the sub album (changing/adding tags) does a strange thing. The symlink is replaced by the changed file and the source file is replaced by another with the same name and with size 0. Like this:

before:
pjlv archon ... $ ls -l 20061231T180626.JPG ../20061231T180626.JPG
... 3569645 Jan  2 01:34 ../20061231T180626.JPG
...      22 Jan 16 12:50 20061231T180626.JPG -> ../20061231T180626.JPG

after:
pjlv archon ... $ ls -l 20061231T180626.JPG ../20061231T180626.JPG
...       0 Jan 16 13:13 ../20061231T180626.JPG
... 3569742 Jan 16 13:13 20061231T180626.JPG

I understand that this technique may seem a dirty hack to "fool" digikam, but nevertheless, it should handle symlinks like symlinks.

How to reproduce:
0. select an album [~/album]
1. create a sub-album (on digikam or on the shell) [~/album/subalbum]
2. symlink an image from the album into sub-album (on the shell) [~/album/subalbum/img001.jpg -> ~/album/subalbum/img001.jpg]
3. navigate into the sub-album folder and change the comment of the linked image file
4. watch the resulting files [~/album/subalbum/img001.jpg (should have 0 bytes), ~/album/subalbum/img001.jpg (shoud no longer be a symlink and is the altered image file)]

Expected behaviour:
4. the symlink in ~/album/subalbum/img001.jpg remains a symlink to ~/album/img001.jpg and ~/album/img001.jpg is changed to reflect the new comment tag.



More information about the Digikam-devel mailing list