[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: PATCH: really delete messages in maildir folders
From:       Kurt Granroth <granroth () kde ! org>
Date:       2001-10-11 17:44:52
[Download RAW message or body]

On Thursday 11 October 2001 01:58 am, Michael Häckel wrote:
> The messages from the outbox are usually moved to sent-mail. Nevertheless,
> moving messages is usually also done by adding it to the other folder and
> deleting it from the original folder. I currently can't see that this would
> work differently for maildir folders. Even then, there would be really
> deleted messages, when moving a message from a maildir folder to a mbox
> folder.

Ah-hah!  This is the thing I was missing.  Of *course* it's moved from
outbox to sent-mail.. I don't know why I missed that.

The bug in kmfoldermaildir, then, is due to my  misunderstanding of a
few methods.  Specifically, 'removeMsg' and 'take'

Currently, the kmsender code just does a sentFolder()->moveMsg() which
does a simple KMFolderMaildir::addMsg.  Normally, this is fine since
addMsg does a 'take' from the messages parent.  *HOWEVER* kmsender
explicitely removes the parent from the message just before it does
the moveMsg!  So in addMsg, the message has no parent and, thus, it
never gets deleted from the original (outbox in this case).

Now kmsender *does* do a msgParent->removeMsg before calling moveMsg.  In
theory, this should make the 'take' in addMsg unnecessary.  However, I
did not reimplement removeMsg in the maildir code, just the take.

AFAICT, those two functions are roughly the same one.  The only difference
I can see is that 'take' does a 'readMsg' if the current message isn't
already a message.  removeMsg doesn't do a readMsg.

So question time: are both of those methods necessary?  Can't one of them
be removed if both do roughly the same things.
-- 
Kurt Granroth            | http://www.granroth.org
KDE Developer/Evangelist | SuSE Labs Open Source Developer
granroth@kde.org         | granroth@suse.com
            KDE -- Conquer Your Desktop

_______________________________________________
kmail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic