Ignore folders that can't be opened for IMAP.

This commit is contained in:
Burak Kaan Köse
2025-02-16 16:17:41 +01:00
parent db833594f4
commit c312ff3faf

View File

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