diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 4d7ad6b5d9..d5f83f09c9 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2031,26 +2031,25 @@ class Core { List> ifolders = new ArrayList<>(); List subscription = new ArrayList<>(); + boolean root = false; List personal = new ArrayList<>(); try { Folder[] pnamespaces = istore.getPersonalNamespaces(); - - boolean root = false; - Folder d = istore.getDefaultFolder(); if (pnamespaces != null) { personal.addAll(Arrays.asList(pnamespaces)); for (Folder p : pnamespaces) - if (d.getFullName().equals(p.getFullName())) { + if (defaultFolder.getFullName().equals(p.getFullName())) { root = true; break; } } - if (!root) - personal.add(d); } catch (MessagingException ex) { Log.e(ex); } + if (!root) + personal.add(defaultFolder); + for (Folder namespace : personal) { EntityLog.log(context, "Personal namespace=" + namespace.getFullName());