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
wilder-work
David Faure 22 years ago
parent 196c101692
commit 5c59d5fb1d
  1. 11
      kmfoldercachedimap.cpp

@ -865,9 +865,12 @@ void KMFolderCachedImap::serverSyncInternal()
KMFolderNode *node = folder()->child()->first();
while( node ) {
if( !node->isDir() ) {
if ( !static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage())->imapPath().isEmpty() )
// Only sync folders that have been accepted by the server
mSubfoldersForSync << static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage());
KMFolderCachedImap* storage = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(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;

Loading…
Cancel
Save