Re: Fix and question for 146967
Jonathan Marten <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kmail |
|---|---|
| Message-ID | <[email protected]> |
Ingo Klöcker writes: > 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. Now I understand - so not closing the folder here would definitely be a Bad Thing. > Without having a closer look at the code I currently don't know how > to open the folder again. I assume this is what KMHeaders::folderClosed() should do. However, KMFolder never emits the closed() signal - there's a comment in KMFolder::close() saying that it shouldn't. There only seems to be two places where the folder needs to be reopened after the compact operation: KMHeaders::setCurrentItemByIndex() and KMHeaders::readSortOrder(). Which of these happens first seems to be random, which I assume is due to multithreading. So would it be OK to explicitly check and reopen the folder in these two places (as per patch at http://bugs.kde.org/show_bug.cgi?id=146967#c5)? > A much safer solution for this bug is the conversion of all mbox > folder to maildir format. That's true, but it assumes an unreasonably high level of technical knowledge on the part of the user - especially since there is no built-in facility in KMail for such a conversion, or even what type of storage a particular folder is currently using. Alternatively, if this is to be encouraged we should do so by, e.g. disabling the compact operation for mbox folders and put up a message telling the user why. -- Jonathan Marten http://www.keelhaul.demon.co.uk Twickenham, UK [email protected]