Fix and question for 146967

Jonathan Marten <[email protected]>
Newsgroups gmane.comp.kde.devel.kmail
Message-ID <[email protected]>
I've noticed this bug too - in KDE 3.5.7, PIM 3.5.5+, and IIRC in
3.5.6 as well.  The root cause seems to be that the compaction job
leaves the folder closed when it is finished - by doing

  mbox->close("mboxcompact", true);

in MboxCompactionJob::done(), and KMHeaders fails to reopen the folder
before using it in either KMHeaders::readSortOrder() or
KMHeaders::setCurrentItemByIndex().

So my question for the experts is: would it be a reasonable fix to
just change the above line to not force the close, i.e. remove the
'true' parameter?  The corresponding code for compacting a maildir
folder (in MaildirCompactionJob::done()) does not force close the
folder - and maildir compaction works with no problems.

By the way, some of the 'owner' parameters used in compactionjob.cpp
seem inconsistent (open with "mboxcompactjob", close using
"mboxcompact").  I'd guess these reall ought to match, although this
is not a problem because the names are never actually used...

-- 
Jonathan Marten                         http://www.keelhaul.demon.co.uk
Twickenham, UK                          [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.