Bug 112724

Summary: Error reading message status (read/unread) in maildir folders
Product: [Applications] kmail Reporter: Luis M. Cruz <luismcv>
Component: maildirAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: jtamate
Priority: NOR Keywords: triaged
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Luis M. Cruz 2005-09-16 14:15:43 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

In void KMFolderMaildir::readFileHeaderIntern() you can find this code:

  // messages in the 'cur' directory are Read by default.. but may
  // actually be some other state (but not New)
  if (status == KMMsgStatusRead)
  {
    if (file.find(":2,") == -1)
      status = KMMsgStatusUnread;
    else if (file.right(5) == ":2,RS")
      status |= KMMsgStatusReplied;
  }

Messages with only ":2," in its filename are Unread messages (":2,S" are read ones), but this code leaves them marked as Read.
Comment 1 MartinG 2007-01-10 23:47:28 UTC
Please also see the closed, but not fixed bugs:
Bug 56792: cachedimap marks all mails as read
Bug 16204: kmail marks unread as read upon filter transfer

I have this problem still, now in kdepim-3.5.5-0.3.fc6 (Fedora Core 6).
(I (re)post here, because this is the only bug that discribes this problem that is not closed.)
Comment 2 MartinG 2007-04-19 16:07:49 UTC
I've read somewhere that my bug is unrelated to this, and just want you to know my bug seems to be fixed - see my comment in 
http://bugs.kde.org/show_bug.cgi?id=121969#c10

Thanks
Comment 3 Jaime Torres 2008-09-18 13:23:39 UTC
The code syntax has changed, but the code semantics is the same in 1.10.1 (kde 4.1.66).
Comment 4 Allan Sandfeld 2010-07-31 15:10:24 UTC
SVN commit 1157541 by carewolf:

Fix a few bugs in parsing message-status in maildir
The bugs meant more status flags was lost than necessary,
when importing a maildir or when rebuilding the index.

BUG: 112724



 M  +23 -7     kmfoldermaildir.cpp  


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