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

List:       kmail-devel
Subject:    Re: [Bug 64566] messages missing in IMAP folder
From:       Till Adam <till () adam-lilienthal ! de>
Date:       2004-05-11 5:30:15
Message-ID: 200405110730.15220.till () adam-lilienthal ! de
[Download RAW message or body]

On Sunday 09 May 2004 17:24, Carsten Burghardt wrote:

> Check if we definitely know the message before deleting it.
> Some servers send the fetch results not in uid order and this caused
> trouble. CCMAIL: 64566-done bugs kde org

[snip]

> -    if (flags & 8 || uid <= lastUid()) {
> +    bool ok = true;
> +    if ( uid <= lastUid() )
> +    {
> +      // as some servers send the messages out of order
> +      // we have to check if the message really already exists
> +      int idx = 0;
> +      KMMsgBase *msg;
> +      while ( idx < count() )
> +      {
> +        msg = getMsgBase( idx );
> +        if ( msg && msg->UID() == uid )
> +        {
> +          ok = false; // exists, no need to create it
> +          break;
> +        }
> +        ++idx;
> +      }
> +    }
> +    // deleted flag
> +    if ( flags & 8 )
> +      ok = false;
> +    if ( !ok )
> +    {

How about doing this with a uidMap for lookup, like we do in dimap?

Till
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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