Bug 49310 - maildir index recreation leaves main screen in confusing state
Summary: maildir index recreation leaves main screen in confusing state
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: index (show other bugs)
Version: 1.4.7
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2002-10-17 23:52 UTC by Andrew Kohlsmith
Modified: 2009-07-31 22:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Kohlsmith 2002-10-17 23:52:40 UTC
Version:           1.4.7 (using KDE 3.0.8 (KDE 3.1 beta2))
Installed from:    compiled sources
Compiler:          gcc version 3.1
OS:          Linux (i686) release 2.4.20-pre10-ac1

Easy way to reproduce:

- pick an email and save it to a file
- open konsole, and copy that email to your ~/Mail/inbox/Maildir/new/ directory
- select the inbox (or go to a different folder then back to inbox) -- general weirdness ensues due to the indexes not being relevant anymore (tons of messages become new again, dates for messages set to "unknown", etc.)

exit kmail, rm ~/Mail/.inbox.index* and start up kmail again -- almost all messages are "unknown" for a date.  You must access each message (click on each one, or use the cursor keys to select each one) so that it's added to the index and the mail file read so that its date header can be seen.

I understand WHY you don't read every message if the index is missing but there should be either a rightclick function to sync up the indexes or something to the effect of a popup saying that the indexes are out of date should be given.

Also, after accessing all the emails, sorting doesn't work right (especially if fancy format is selected for the date) -- you need to sort by author or subject first, then go back to sorting by date.  

No crashing, just lots of confusion.
Comment 1 Nathaniel W. Turner 2002-12-06 01:20:23 UTC
Hmm... AIUI, kmail's folder indexes are a type of cache.  If they become out of date or 
corrupted, I *don't* understand why kmail doesn't simply rebuild them *in the background* and 
without pestering the user with a bunch of questions (current CVS seems to pop up a dialog 
box if the indexes are out-of-date or correupted).  They are a *cache*.  They are essentially 
nothing more than a speed optimization.  If they go away, or break, the worst thing that should 
happen is that things should be slower (until they are rebuilt). 
 
(If I'm way off base in my understanding, I apologize, and please correct me.) 
Comment 2 Ingo Klöcker 2002-12-06 10:04:32 UTC
As I outlined in my reply to bug #51557 the index is not a simple cache. It contains information 
which is lost during regeneration. 
Comment 3 George Goldberg 2007-11-09 04:12:43 UTC
Should this be closed as invalid?
Comment 4 Andrew Kohlsmith 2007-11-09 04:28:51 UTC
Why would it be closed as invalid?  Ingo commented that kmail's indexes are not a simple cache, but would it not be prudent to have *some* nice way of handling their becoming out of date without screwing up the message list?
Comment 5 Michael Leupold 2008-11-09 17:40:59 UTC
I tried reproducing this using trunk r881868 but couldn't.

Adding a new mail to the new/ folder of inbox doesn't show up (I guess it's not supposed to be manually tempered with). Rebuilding the inbox exhibits it but only marks this one message unread.

Removing the indices and restarting kmail shows all mails with the right date.
Comment 6 Martin Koller 2009-07-31 22:29:53 UTC
Testing again with kmail/KDE 4.3 RC3 I see no problem with all mentioned steps.
No messages, no display problems. Seems to be fixed already.