Remove unnecessary portions from regexps for mailbox status responses

fork
Brian White 13 years ago
parent 04753b2423
commit 7aaeeced9e

@ -292,11 +292,11 @@ ImapConnection.prototype.connect = function(loginCb) {
self.emit('alert', result[1]); self.emit('alert', result[1]);
else if (self._state.status === STATES.BOXSELECTING) { else if (self._state.status === STATES.BOXSELECTING) {
var result; var result;
if (result = /^\[UIDVALIDITY (\d+)\].*/i.exec(data[2])) if (result = /^\[UIDVALIDITY (\d+)\]/i.exec(data[2]))
self._state.box.validity = result[1]; self._state.box.validity = result[1];
else if (result = /^\[UIDNEXT (\d+)\].*/i.exec(data[2])) else if (result = /^\[UIDNEXT (\d+)\]/i.exec(data[2]))
self._state.box._uidnext = result[1]; self._state.box._uidnext = result[1];
else if (result = /^\[PERMANENTFLAGS \((.*)\)\].*/i.exec(data[2])) { else if (result = /^\[PERMANENTFLAGS \((.*)\)\]/i.exec(data[2])) {
self._state.box.permFlags = result[1].split(' '); self._state.box.permFlags = result[1].split(' ');
var idx; var idx;
if ((idx = self._state.box.permFlags.indexOf('\\*')) > -1) { if ((idx = self._state.box.permFlags.indexOf('\\*')) > -1) {

Loading…
Cancel
Save