|
|
@ -28,7 +28,7 @@ var CRLF = '\r\n',
|
|
|
|
RE_DBLQ = /"/g,
|
|
|
|
RE_DBLQ = /"/g,
|
|
|
|
RE_CMD = /^([^ ]+)(?: |$)/,
|
|
|
|
RE_CMD = /^([^ ]+)(?: |$)/,
|
|
|
|
RE_ISHEADER = /HEADER/,
|
|
|
|
RE_ISHEADER = /HEADER/,
|
|
|
|
REX_UNRESPDATA = XRegExp('^\\* (?:(?:(?<type>NAMESPACE) (?<personal>(?:NIL|\\((?:\\(.+\\))+\\))) (?<other>(?:NIL|\\((?:\\(.+\\))+\\))) (?<shared>(?:NIL|\\((?:\\(.+\\))+\\))))|(?:(?<type>FLAGS) \\((?<flags>.*)\\))|(?:(?<type>LIST|LSUB|XLIST) \\((?<flags>.*)\\) (?<delimiter>".+"|NIL) (?<mailbox>.+))|(?:(?<type>(SEARCH|SORT))(?: (?<results>.*))?)|(?:(?<type>STATUS) (?<mailbox>.+) \\((?<attributes>.*)\\))|(?:(?<type>CAPABILITY) (?<capabilities>.+))|(?:(?<type>BYE) (?:\\[(?<code>.+)\\] )?(?<message>.+)))[ \t]*(?:\r\n|$)', 'i'),
|
|
|
|
REX_UNRESPDATA = XRegExp('^\\* (?:(?:(?<type>NAMESPACE) (?<personal>(?:NIL|\\((?:\\(.+\\))+\\))) (?<other>(?:NIL|\\((?:\\(.+\\))+\\))) (?<shared>(?:NIL|\\((?:\\(.+\\))+\\))))|(?:(?<type>FLAGS) \\((?<flags>.*)\\))|(?:(?<type>LIST|LSUB|XLIST) \\((?<flags>.*)\\) (?<delimiter>"[^"]+"|NIL) (?<mailbox>.+))|(?:(?<type>(SEARCH|SORT))(?: (?<results>.*))?)|(?:(?<type>STATUS) (?<mailbox>.+) \\((?<attributes>.*)\\))|(?:(?<type>CAPABILITY) (?<capabilities>.+))|(?:(?<type>BYE) (?:\\[(?<code>.+)\\] )?(?<message>.+)))[ \t]*(?:\r\n|$)', 'i'),
|
|
|
|
REX_UNRESPNUM = XRegExp('^\\* (?<num>\\d+) (?:(?<type>EXISTS)|(?<type>RECENT)|(?<type>EXPUNGE)|(?:(?<type>FETCH) \\((?<info>.*)\\)))[ \t]*(?:\r\n|$)', 'i');
|
|
|
|
REX_UNRESPNUM = XRegExp('^\\* (?<num>\\d+) (?:(?<type>EXISTS)|(?<type>RECENT)|(?<type>EXPUNGE)|(?:(?<type>FETCH) \\((?<info>.*)\\)))[ \t]*(?:\r\n|$)', 'i');
|
|
|
|
|
|
|
|
|
|
|
|
// extension constants
|
|
|
|
// extension constants
|
|
|
@ -452,7 +452,7 @@ ImapConnection.prototype.connect = function(loginCb) {
|
|
|
|
curChildren = requests[0].cbargs[0];
|
|
|
|
curChildren = requests[0].cbargs[0];
|
|
|
|
|
|
|
|
|
|
|
|
if (box.delimiter) {
|
|
|
|
if (box.delimiter) {
|
|
|
|
var path = name.split(box.delimiter).filter(utils.isNotEmpty),
|
|
|
|
var path = name.split(box.delimiter),
|
|
|
|
parent = null;
|
|
|
|
parent = null;
|
|
|
|
name = path.pop();
|
|
|
|
name = path.pop();
|
|
|
|
for (i=0,len=path.length; i<len; i++) {
|
|
|
|
for (i=0,len=path.length; i<len; i++) {
|
|
|
|