From 98e04c09837565dd3563d25f87b9cb50aed1801d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20B=C4=9Bhan?= Date: Mon, 2 May 2011 07:11:20 +0200 Subject: [PATCH] bugfix: broken _uidnext parsing in openBox --- imap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imap.js b/imap.js index b7dea75..febe898 100644 --- a/imap.js +++ b/imap.js @@ -257,11 +257,11 @@ ImapConnection.prototype.connect = function(loginCb) { self.emit('alert', result[1]); else if (self._state.status === STATES.BOXSELECTING) { var result; - if ((result = /^\[UIDVALIDITY (\d+)\]$/i.exec(data[2])) !== null) + if ((result = /^\[UIDVALIDITY (\d+)\].*/i.exec(data[2])) !== null) self._state.box.validity = result[1]; - else if ((result = /^\[UIDNEXT (\d+)\]$/i.exec(data[2])) !== null) + else if ((result = /^\[UIDNEXT (\d+)\].*/i.exec(data[2])) !== null) self._state.box._uidnext = result[1]; - else if ((result = /^\[PERMANENTFLAGS \((.*)\)\]$/i.exec(data[2])) !== null) { + else if ((result = /^\[PERMANENTFLAGS \((.*)\)\].*/i.exec(data[2])) !== null) { self._state.box.permFlags = result[1].split(' '); var idx; if ((idx = self._state.box.permFlags.indexOf('\\*')) > -1) {