Ignore folders that can't be opened for IMAP.
This commit is contained in:
@@ -531,10 +531,8 @@ public class ImapSynchronizer : WinoSynchronizer<ImapRequest, ImapMessageCreatio
|
|||||||
if (remoteFolder.IsNamespace && !remoteFolder.Attributes.HasFlag(FolderAttributes.Inbox) || !remoteFolder.Exists)
|
if (remoteFolder.IsNamespace && !remoteFolder.Attributes.HasFlag(FolderAttributes.Inbox) || !remoteFolder.Exists)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Check for NoSelect folders. These are not selectable folders.
|
// Ignore folders that can't be opened.
|
||||||
// TODO: With new MailKit version 'CanOpen' will be implemented for ease of use. Use that one.
|
if (!remoteFolder.CanOpen) continue;
|
||||||
if (remoteFolder.Attributes.HasFlag(FolderAttributes.NoSelect))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var existingLocalFolder = localFolders.FirstOrDefault(a => a.RemoteFolderId == remoteFolder.FullName);
|
var existingLocalFolder = localFolders.FirstOrDefault(a => a.RemoteFolderId == remoteFolder.FullName);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user