Bug 136903

Summary: if partition gets full during camera/card copy there is no warning and empty files are created.
Product: [Applications] digikam Reporter: Alexia Death <alexiadeath>
Component: Import-UMSAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: VHI    
Version: 0.9.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.1
Sentry Crash Report:

Description Alexia Death 2006-11-05 18:43:30 UTC
Version:           0.9.0-beta1 (using KDE KDE 3.5.4)
Installed from:    Gentoo Packages
OS:                Linux

If drive gets full during image copy operation in camera gui no warning is issued and empty files are created for files that did not have room.

This is a bug because I erased the card aftrwards, expecting a complete copy and later looking at the pictures realized that some of the good images I had shoot later were only epty files on my full photo partition... I lost the images.
Comment 1 caulier.gilles 2006-11-14 20:42:49 UTC
This file must be fixed before 0.9.0-final release.

Gilles Caulier
Comment 2 caulier.gilles 2006-12-10 18:27:20 UTC
Marcel, 

Can you reproduce this problem on your computer ? 

Gilles
Comment 3 Marcel Wiesweg 2007-01-03 17:58:02 UTC
SVN commit 619537 by mwiesweg:

When partition is full, QIODevice::writeBlock will not return -1 as error,
but 0 for zero bytes written.

BUG: 136903


 M  +1 -1      umscamera.cpp  


--- trunk/extragear/graphics/digikam/utilities/cameragui/umscamera.cpp #619536:619537
@@ -239,7 +239,7 @@
     Q_LONG len;
     while ((len = sFile.readBlock(buffer, MAX_IPC_SIZE)) != 0 && !m_cancel)
     {
-        if (len == -1 || dFile.writeBlock(buffer, (Q_ULONG)len) == -1)
+        if (len == -1 || dFile.writeBlock(buffer, (Q_ULONG)len) != len)
         {
             sFile.close();
             dFile.close();