[Digikam-devel] [Bug 268831] Interrupted-restarted import results in empty file

Adam Porter adam at alphapapa.net
Fri Mar 18 16:49:25 GMT 2011


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





--- Comment #1 from Adam Porter <adam alphapapa net>  2011-03-18 17:49:24 ---
This bug is worse than I realized.  A total of 12 images ended up as zero-byte
files on the disk in the album directory.  But:

1.  Digikam shows them as not-new images in the import dialog.

2.  In the on-disk album view, Digikam displays thumbnails and metadata for all
of these images which are zero bytes on the disk!  Only when double-clicking
the thumbnail does Digikam say "Cannot display preview for..."

So unless the user opens the album directory in Dolphin and verifies for
himself that the files are intact, he may cheerfully delete his only copies of
the images from his camera.

I am using ext4, by the way.

Perhaps fortuitously, I was reading a Debian bug about dpkg running on ext4
filesystems today and I believe Theodore Ts'o's solution may be applicable
here:

http://article.gmane.org/gmane.linux.debian.devel.bugs.general/771761

I suspect Digikam isn't even calling fsync as images are downloaded from the
camera.  That would be ok if it didn't think they were downloaded successfully,
because they could be redownloaded/reimported after rebooting.  But Digikam
puts both the thumbnails and EXIF metadata of unwritten files into the
database, and displays them in the album view as if the images are intact
on-disk, leaving the poor, unsuspecting user with no idea that the files were
never written to the disk.

I'm sure we can all agree that Digikam should always fail safely and assume
nothing when it comes to protecting users' data, right?  Personally, I hate
having to babysit software to make sure it does the right thing.  :)

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