Bug 136903 - if partition gets full during camera/card copy there is no warning and empty files are created.
Summary: if partition gets full during camera/card copy there is no warning and empty ...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-UMS (show other bugs)
Version: 0.9.0
Platform: Gentoo Packages Linux
: VHI normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-05 18:43 UTC by Alexia Death
Modified: 2017-08-16 05:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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();