Fix subfolders of the inbox.

b/17327099

Change-Id: I82f82a9bf2ceda73606471dc669253d2ac4ec0c5
This commit is contained in:
Martin Hibdon 2014-09-17 10:00:51 -07:00
parent bb68c13afa
commit 99f9ead3ef
1 changed files with 5 additions and 0 deletions

View File

@ -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) {