File corruption with KSaveFile on full disk

Thiago Macieira thiago at kde.org
Sun Jan 18 09:06:10 GMT 2009


Michael Leupold wrote:
>I seem to have to check the return value and use waitForBytesWritten()
> unless I'm using unbuffered output as QIODevice::write() might (will?)
> return the number of bytes I tried to write even if the disk is full.
> That's at least what a simple test suggests.

Use an unbuffered QFile and check the return value of write().

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090118/84c94888/attachment.sig>


More information about the kde-core-devel mailing list