Bug 78168 - files written by KOffice apps are not loadable anymore
Summary: files written by KOffice apps are not loadable anymore
Status: RESOLVED FIXED
Alias: None
Product: koffice
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: KOffice Bug Wranglers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-21 21:02 UTC by Bernd Pol
Modified: 2004-03-21 23:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
test file which crashed kword on load (4.00 KB, application/x-kword)
2004-03-21 21:04 UTC, Bernd Pol
Details
This is the corrupted file (3.33 KB, application/x-kword)
2004-03-21 21:05 UTC, Bernd Pol
Details
original, uncorrupted file (3.50 KB, application/x-kword)
2004-03-21 21:07 UTC, Bernd Pol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Pol 2004-03-21 21:02:05 UTC
Version:           Unbekannt (using KDE 3.2.90 (CVS >= 20040117), compiled sources)
Compiler:          gcc version 3.3.1 (SuSE Linux)
OS:          Linux (i686) release 2.4.21-99-athlon

This is on HEAD update of 2004-03-20.
Neither KWord nor KSpread can load their newly written files anymore. I get a "no valid KOffice file" error message (in German: "Öffnen der Datei /home/bp/Desktop/Test.kwd nicht möglich
Ursache: Keine gültige KOffice-Datei"), then the apps both crash upon closing the error message window.
(Sorry, no backtrace available.)
Comment 1 Bernd Pol 2004-03-21 21:04:17 UTC
Created attachment 5321 [details]
test file which crashed kword on load
Comment 2 Bernd Pol 2004-03-21 21:05:58 UTC
Created attachment 5322 [details]
This is the corrupted file

(Sorry, wrong file sent.)
Comment 3 Bernd Pol 2004-03-21 21:07:35 UTC
Created attachment 5323 [details]
original, uncorrupted file

This file was loaded into KWord, then saved as Test.kwd
Comment 4 David Faure 2004-03-21 23:19:09 UTC
CVS commit by faure: 

Ouch, logic error introduced in my last commit to this file...
Thanks for the report, sorry for the breakage.
CCMAIL: 78168-done@bugs.kde.org


  M +1 -1      kzip.cpp   1.47


--- kdelibs/kio/kio/kzip.cpp  #1.46:1.47
@@ -760,5 +760,5 @@ bool KZip::closeArchive()
 
         crc = crc32(crc, (Bytef *)buffer, bufferSize );
-        bool ok = ( device()->writeBlock( buffer, bufferSize ) != bufferSize );
+        bool ok = ( device()->writeBlock( buffer, bufferSize ) == bufferSize );
         delete[] buffer;
         if ( !ok )