Folders that cannot hold messages are not selectable

This commit is contained in:
M66B 2019-08-21 18:35:33 +02:00
parent e42c941300
commit d02679915c
1 changed files with 2 additions and 1 deletions

View File

@ -885,7 +885,8 @@ class Core {
boolean subscribed = subscription.contains(fullName); boolean subscribed = subscription.contains(fullName);
String[] attr = ((IMAPFolder) ifolder).getAttributes(); String[] attr = ((IMAPFolder) ifolder).getAttributes();
String type = EntityFolder.getType(attr, fullName, false); String type = EntityFolder.getType(attr, fullName, false);
boolean selectable = !Arrays.asList(attr).contains("\\Noselect"); boolean selectable = !Arrays.asList(attr).contains("\\Noselect") &&
((ifolder.getType() & IMAPFolder.HOLDS_MESSAGES) != 0);
if (EntityFolder.INBOX.equals(type) || fullName.equals(childName)) if (EntityFolder.INBOX.equals(type) || fullName.equals(childName))
childName = null; childName = null;