@ -369,7 +369,9 @@ ImapConnection.prototype.connect = function(loginCb) {
}
}
box . parent = parent ;
box . parent = parent ;
}
}
curChildren [ name ] = box ;
if ( ! curChildren [ name ] ) {
curChildren [ name ] = box ;
}
}
}
break ;
break ;
default :
default :
@ -618,7 +620,7 @@ ImapConnection.prototype.renameBox = function(oldname, newname, cb) {
if ( this . _state . status === STATES . BOXSELECTED
if ( this . _state . status === STATES . BOXSELECTED
&& oldname === this . _state . box . name && oldname !== 'INBOX' )
&& oldname === this . _state . box . name && oldname !== 'INBOX' )
this . _state . box . _newName = oldname ;
this . _state . box . _newName = oldname ;
this . _send ( 'RENAME "' + escape ( oldname ) + '" "' + escape ( newname ) + '"' , cb ) ;
this . _send ( 'RENAME "' + escape ( oldname ) + '" "' + escape ( newname ) + '"' , cb ) ;
} ;
} ;
@ -1561,21 +1563,21 @@ function extend() {
if ( ! obj || toString . call ( obj ) !== "[object Object]" || obj . nodeType
if ( ! obj || toString . call ( obj ) !== "[object Object]" || obj . nodeType
|| obj . setInterval )
|| obj . setInterval )
return false ;
return false ;
var has _own _constructor = hasOwnProperty . call ( obj , "constructor" ) ;
var has _own _constructor = hasOwnProperty . call ( obj , "constructor" ) ;
var has _is _prop _of _method = hasOwnProperty . call ( obj . constructor . prototype ,
var has _is _prop _of _method = hasOwnProperty . call ( obj . constructor . prototype ,
"isPrototypeOf" ) ;
"isPrototypeOf" ) ;
// Not own constructor property must be Object
// Not own constructor property must be Object
if ( obj . constructor && ! has _own _constructor && ! has _is _prop _of _method )
if ( obj . constructor && ! has _own _constructor && ! has _is _prop _of _method )
return false ;
return false ;
// Own properties are enumerated firstly, so to speed up,
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
// if last one is own, then all properties are own.
var last _key ;
var last _key ;
for ( var key in obj )
for ( var key in obj )
last _key = key ;
last _key = key ;
return last _key === undefined || hasOwnProperty . call ( obj , last _key ) ;
return last _key === undefined || hasOwnProperty . call ( obj , last _key ) ;
} ;
} ;
@ -1642,7 +1644,7 @@ function bufferSplit(buf, str) {
ret = [ buf ] ;
ret = [ buf ] ;
else if ( start < buf . length )
else if ( start < buf . length )
ret . push ( buf . slice ( start ) ) ;
ret . push ( buf . slice ( start ) ) ;
return ret ;
return ret ;
} ;
} ;