Exchange doesn't always quote mailbox names -- make quotes optional in regex.

fork
Alex Drummond 13 years ago
parent 8753fc28ec
commit c1a8fedebd

@ -337,7 +337,7 @@ 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();
@ -1561,4 +1561,4 @@ function pipe(pair, socket) {
socket.on('close', onclose);
return cleartext;
}
}

Loading…
Cancel
Save