From 99f9ead3efeba6f0ca2d2b09bf8eb1aca8759b3e Mon Sep 17 00:00:00 2001 From: Martin Hibdon Date: Wed, 17 Sep 2014 10:00:51 -0700 Subject: [PATCH] Fix subfolders of the inbox. b/17327099 Change-Id: I82f82a9bf2ceda73606471dc669253d2ac4ec0c5 --- provider_src/com/android/email/mail/store/ImapStore.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/provider_src/com/android/email/mail/store/ImapStore.java b/provider_src/com/android/email/mail/store/ImapStore.java index d45188837..89667eb7f 100644 --- a/provider_src/com/android/email/mail/store/ImapStore.java +++ b/provider_src/com/android/email/mail/store/ImapStore.java @@ -321,6 +321,11 @@ public class ImapStore extends Store { String parentPath = null; if (delimiterIdx != -1) { parentPath = path.substring(0, delimiterIdx); + if (ImapConstants.INBOX.equalsIgnoreCase(parentPath)) { + // The Inbox is added as a special case, and always in all caps. In reality, + // it might not be in all caps, this folder's parent path might have mixed case. + parentPath = ImapConstants.INBOX; + } final ImapFolder parentFolder = mailboxes.get(parentPath); final Mailbox parentMailbox = (parentFolder == null) ? null : parentFolder.mMailbox; if (parentMailbox != null) {