Bug 146967 - [PATCH] After compact action mail list disappears
Summary: [PATCH] After compact action mail list disappears
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: mbox (show other bugs)
Version: 1.9.7
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 147346 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-19 17:34 UTC by S. Umar
Modified: 2007-11-07 11:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Experimental patch to fix problem (1.26 KB, patch)
2007-06-25 19:17 UTC, Jonathan Marten
Details
Another expermimental patch (2.27 KB, patch)
2007-06-26 10:00 UTC, Jonathan Marten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S. Umar 2007-06-19 17:34:32 UTC
Version:           1.5.7+ (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc-4.1.1 
OS:                Linux

I just updated to 3.5.7 + SVN changes upto June 18, 2007. When I use the
compact action on my inbox (mbox format) the list of undeleted mails
disappears leaving an empty mail list window. Switching to another folder
and coming back to inbox returns the list of undeleted mails.

This was not the case in 3.5.6.
Thanks
Comment 1 S. Umar 2007-06-20 15:14:54 UTC
I have tested generic 3.5.7 and it has the same problem, so it is not
recent svn changes.
Comment 2 Jonathan Marten 2007-06-25 19:16:42 UTC
Can reproduce here too, on both 3.5 and work branches, but only for mbox folders (maildir folders seem OK).

The attached patch appears to fix the problem, although I don't know if it is the best way to fix it.  Could you please try it out and report?
Comment 3 Jonathan Marten 2007-06-25 19:17:42 UTC
Created attachment 20957 [details]
Experimental patch to fix problem
Comment 4 Ingo Klöcker 2007-06-25 23:41:27 UTC
Please do not try this patch. It can lead to the loss of mail. The mbox folder must be closed because the old mbox file is replaced by a new compacted version of the mbox file.
Comment 5 Jonathan Marten 2007-06-26 10:00:53 UTC
Created attachment 20966 [details]
Another expermimental patch

As Ingo says, don't use the previous patch.

Here's another one which doesn't change anything to do with index generation,
but which ensures that the folder is reopened in the two cases where it is
needed.
Comment 6 Jonathan Marten 2007-06-29 10:39:01 UTC
*** Bug 147346 has been marked as a duplicate of this bug. ***
Comment 7 S. Umar 2007-07-10 16:21:50 UTC
Is this ready to be committed to SVN?
Comment 8 Jonathan Marten 2007-07-10 16:47:21 UTC
I'd like a confirmation from the experts that this fix is the right thing to do.  Have sent a message to the ML to this effect, but no response so far (everybody is probably away at aKademy).
Comment 9 S. Umar 2007-10-13 15:40:29 UTC
This should have been in 3.5.8. Very important problem effecting many users.
Can it be done?
Sammy
Comment 10 Jonathan Marten 2007-11-07 10:58:36 UTC
From the kde-pim ML:

From: Ingo Klöcker <kloecker@kde.org>
Message-id: <200711062238.29142@erwin.ingo-kloecker.de>
Subject: Re: [Kde-pim] compacting mbox shows empty folder

On Tuesday 06 November 2007, Rex Dieter wrote:
> See also,
> http://bugs.kde.org/146967
>
> Does the provided patch look good?

Not really. It might fix the symptoms but it does not seem to fix the 
real problem. Anyway, the patch shouldn't hurt and thus it should 
probably be applied.

Regards,
Ingo
Comment 11 Jonathan Marten 2007-11-07 11:23:22 UTC
SVN commit 733841 by marten:

Fix "After compact action mail list disappears", by ensuring that the
folder is open in the two places where it may be needed.

BUG:146967


 M  +2 -2      compactionjob.cpp  
 M  +5 -0      kmheaders.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=733841
Comment 12 Jonathan Marten 2007-11-07 11:27:06 UTC
SVN commit 733843 by marten:

Forward port of commit 733841 from 3.5 branch:

Fix "After compact action mail list disappears", by ensuring that the 
folder is open in the two places where it may be needed.  Not such a major
issue now that maildir is the recommended format and mandatory for the
standard folders.
  
CCBUG:146967 


 M  +2 -2      compactionjob.cpp  
 M  +6 -0      kmheaders.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=733843