From 5c59d5fb1dd3baadf01e90034ecc6aa77a877033 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 30 Jun 2004 12:29:59 +0000 Subject: [PATCH] Don't try to sync folders that were just deleted from the client (and then the server) (the symptom was a "could not list folder foobar, no such folder" error box). Strange that I didn't see that one before (probably the imappath was reset?) svn path=/branches/proko2/kdepim/; revision=324884 --- kmfoldercachedimap.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kmfoldercachedimap.cpp b/kmfoldercachedimap.cpp index 320d0ffc0..d1c50f31b 100644 --- a/kmfoldercachedimap.cpp +++ b/kmfoldercachedimap.cpp @@ -865,9 +865,12 @@ void KMFolderCachedImap::serverSyncInternal() KMFolderNode *node = folder()->child()->first(); while( node ) { if( !node->isDir() ) { - if ( !static_cast(static_cast(node)->storage())->imapPath().isEmpty() ) - // Only sync folders that have been accepted by the server - mSubfoldersForSync << static_cast(static_cast(node)->storage()); + KMFolderCachedImap* storage = static_cast(static_cast(node)->storage()); + // Only sync folders that have been accepted by the server + if ( !storage->imapPath().isEmpty() + // and that were not just deleted from it + && !foldersForDeletionOnServer.contains( storage->imapPath() ) ) + mSubfoldersForSync << storage; } node = folder()->child()->next(); } @@ -1684,7 +1687,7 @@ void KMFolderCachedImap::setContentsType( KMail::FolderContentsType type ) mContentsTypeChanged = true; } // We want to store an annotation on the folder only if using the kolab storage. - if ( kmkernel->iCalIface().storageFormat( folder() ) == KMailICalIfaceImpl::StorageXML ) + if ( kmkernel->iCalIface().storageFormat( folder() ) == KMailICalIfaceImpl::StorageXML ) mAnnotationFolderType = s_contentsType2Annotation[mContentsType]; else mAnnotationFolderType = QString::null;