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

Marcel Wiesweg marcel.wiesweg at gmx.de
Mon May 24 16:00:19 BST 2010


https://bugs.kde.org/show_bug.cgi?id=233222





--- Comment #22 from Marcel Wiesweg <marcel wiesweg gmx de>  2010-05-24 16:59:59 ---
Yes KDirWatch is notoriously broken (or crashes, alternatively) so digikam may
not react to extern file operations. Nonetheless I dont see any reason why at
digikam startup, file scanning should see files with size 0 or 8192 unless they
are currently being written and really have this size. In a short test, the cp
command seems to use a buffer size of 8192. Looking at the code of uniqueHash
generation, it will return a null array if it fails to read any bytes from a
file.
The scanning code in digikam is identical for startup scan or scanning while
running.

So this looks like a race condition between a cp operation and a simultaneously
running file scanner. But I'm unsure how to prevent this. Short research
revealed no reliable method to find out if a file is currently being written
to.

-- 
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