diff --git a/lib/imap.js b/lib/imap.js index 89de0ec..eddcebe 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -24,6 +24,7 @@ var CRLF = '\r\n', RE_LITHEADER = /(?:((?:BODY\[.*\](?:<\d+>)?)?|[^ ]+) )?\{(\d+)\}$/i, RE_UNRESP = /^\* (OK|PREAUTH|NO|BAD) (?:\[(.+)\] )?(.+)$/i, //RE_ISPARTIAL = /<(\d+)>$/, + RE_DBLQ = /"/g, RE_CMD = /^([^ ]+)(?: |$)/, RE_ISHEADER = /HEADER/, REX_UNRESPDATA = XRegExp('^\\* (?:(?:(?NAMESPACE) (?(?:NIL|\\((?:\\(.+\\))+\\))) (?(?:NIL|\\((?:\\(.+\\))+\\))) (?(?:NIL|\\((?:\\(.+\\))+\\))))|(?:(?FLAGS) \\((?.*)\\))|(?:(?LIST|LSUB|XLIST) \\((?.*)\\) (?".+"|NIL) (?.+))|(?:(?(SEARCH|SORT))(?: (?.*))?)|(?:(?STATUS) (?.+) \\((?.*)\\))|(?:(?CAPABILITY) (?.+))|(?:(?BYE) (?:\\[(?.+)\\] )?(?.+)))$', 'i'), @@ -210,13 +211,13 @@ ImapConnection.prototype.connect = function(loginCb) { } function emitLitData(key, data) { - var fetches = requests[0].fetchers[key]; + var fetches = requests[0].fetchers[key.replace(RE_DBLQ, '')]; for (var i=0, len=fetches.length; i