[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: File corruption with KSaveFile on full disk
From:       David Faure <faure () kde ! org>
Date:       2009-09-15 12:00:15
Message-ID: 200909151400.16239.faure () kde ! org
[Download RAW message or body]

On Friday 11 September 2009, Oswald Buddenhagen wrote:
> On Wed, Sep 09, 2009 at 10:37:20PM +0200, Jaime Torres Amate wrote:
> > In my modest opinion, the problem is not in KSaveFile, but in KConfig
> > write()s to the KSaveFile temporary file,
> 
> well ... both ksavefile and kconfigini are screwed up, so there is no
> point in arguing. :D

Nope, only KConfig was screwed up.
Created a reproduceable testcase, and fixed it in r1023830/r1023836.

It was a fun dialogue between QFile and KConfig... QFile::size() returned 0
because ensureFlushed() failed, and KConfig deduced from that, that
the file _on disk_ was empty and should be deleted (!).

-- 
David Faure, faure@kde.org, sponsored by Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic