Re: Fix and question for 146967

Ingo Klöcker <[email protected]>
Newsgroups gmane.comp.kde.devel.kmail
Message-ID <[email protected]>
On Monday 25 June 2007 19:35, Jonathan Marten wrote:
> 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.

The difference between maildir and mbox is that in the case of mbox the 
compacted mbox is stored in a new mbox file. This new mbox file 
replaces the old mbox file and in order for this replacing to work the 
old mbox storage must be closed and the new one must be opened. Without 
having a closer look at the code I currently don't know how to open the 
folder again.

A much safer solution for this bug is the conversion of all mbox folder 
to maildir format.

Regards,
Ingo

_______________________________________________
KMail developers mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kmail-devel
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBGgDW6GnR+RTDgudgRAjxZAKC5r3H2ghBNXHC1zfjZYIwf2IkrDACfdqYD
kxi2BcHHYHiMtnk+zji9jPI=
=/b3l
-----END PGP SIGNATURE-----
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.