Skip to content

Commit

Permalink
Relax mailbox name regex
Browse files Browse the repository at this point in the history
  • Loading branch information
mscdex committed Apr 12, 2012
1 parent 5c9343d commit 5ba4638
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions imap.js
Expand Up @@ -346,18 +346,18 @@ ImapConnection.prototype.connect = function(loginCb) {
else if (self.delim !== null) {
if (self._state.requests[0].args.length === 0)
self._state.requests[0].args.push({});
result = /^\((.*)\) (.+?) "?([^"]+)"?$/.exec(data[2]);
result = /^\((.*)\) (.+?) (.+)$/.exec(data[2]);
var box = {
attribs: result[1].split(' ').map(function(attrib) {
return attrib.substr(1).toUpperCase();
})/*.filter(function(attrib) {
return (BOX_ATTRIBS.indexOf(attrib) > -1);
})*/,
delim: (result[2] === 'NIL'
? false : result[2].substring(1, result[2].length-1)),
children: null,
parent: null
}, name = result[3], curChildren = self._state.requests[0].args[0];
attribs: result[1].split(' ').map(function(attrib) {
return attrib.substr(1).toUpperCase();
}),
delim: (result[2] === 'NIL'
? false : result[2].substring(1, result[2].length-1)),
children: null,
parent: null
}, name = result[3], curChildren = self._state.requests[0].args[0];
if (name[0] === '"' && name[name.length-1] === '"')
name = name.substring(1, name.length - 1);

if (box.delim) {
var path = name.split(box.delim).filter(isNotEmpty),
Expand Down

0 comments on commit 5ba4638

Please sign in to comment.