[Digikam-devel] [Bug 233222] Thumbnails displayed are from incorrect images

PCB bugreports at familie-becker.eu
Tue May 25 11:24:42 CEST 2010


--- Comment #24 from PCB <bugreports familie-becker eu>  2010-05-25 11:24:38 ---
Hm, I'm still not convinced that the cp operation is the reason for the
error... still sure that cp operation and sync to HDD were already finished in
my case. But as long as Digikams behaviour gets better this way and the false
thumbnails are gone, I'm happy :-) Question is: When will Digikam discover that
the file size has changed? Ok, at least at next rescan. But what if I open up
Digikam, new pics are scanned in, possibly with wrong filesize and thumb again,
and then I open one of the new albums and click on a picture. Is this

Additional comments and thoughts:
1. Is it in any way possible to find out whether a certain file is currently
opened for write operations by another process? I didn't find anything like
that in "man 2 stat", but only had a short look. One other solution could be
that Digikam opens each _new_ file for writing and immediatly closes it again
without modification. As long as only one process may open each file for
writing at a time, this would result in the appropriate error code that could
be checked. Of course, there are (at least) two preconditions: mtime of the
file must not be modified, and it mustn't slow down Digikams scanning
operation. And, of course, this cannot be applied to read-only file systems
(different error code?).

2. Assume we have a file with 0 bytes length and name x.jpg. Even with the
version patched by Marcel this will result in a DB entry without uniqueHash and
with wrong thumbnail. Especially the latter is cleary an error and just mustn't
happen. What about a special treatment for corrupt jpg files (or whatever other
picture format)? I think the thumbnail error could be avoided if every file,
even empty ones, get a uniqueHash. Though I don't know how unique this will be
for empty files... at least this way they could perhaps point to a special
thumbnail indicating "this file is corrupt".

Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Digikam-devel mailing list