Complete result of getBoxes()

When I run LIST on my IMAP server, I get something like this:

. LIST "" "*"
...
* LIST (\HasNoChildren) "." "INBOX.archiv.inbox2005"
* LIST (\HasNoChildren) "." "INBOX.archiv.inbox2006"
* LIST (\HasNoChildren) "." "INBOX.archiv.inbox2007"
* LIST (\HasNoChildren) "." "INBOX.archiv.inbox2009"
* LIST (\HasChildren) "." "INBOX.archiv"
...

The current implementation overwrites the "INBOX.archiv.inbox..."
boxes as soon as "INBOX.archiv" is processed.

This is a small fix to make sure that the previously processed
boxes are not overwritten.
fork
Fabian Stäber 13 years ago
parent d6ea43d36e
commit 1ee51e318a

@ -369,8 +369,10 @@ ImapConnection.prototype.connect = function(loginCb) {
}
box.parent = parent;
}
if ( ! curChildren[name] ) {
curChildren[name] = box;
}
}
break;
default:
if (/^\d+$/.test(data[1])) {

Loading…
Cancel
Save