Connection: check both permFlags and flags in move()

fork
mscdex 11 years ago
parent c7f5171cb2
commit 6b52620fd9

@ -585,7 +585,8 @@ Connection.prototype._move = function(which, uids, boxTo, cb) {
boxTo = escape(utf7.encode(''+boxTo));
this._enqueue(which + 'MOVE ' + uids + ' "' + boxTo + '"', cb);
} else if (this._box.permFlags.indexOf('\\Deleted') === -1) {
} else if (this._box.permFlags.indexOf('\\Deleted') === -1
&& this._box.flags.indexOf('\\Deleted') === -1) {
throw new Error('Cannot move message: '
+ 'server does not allow deletion of messages');
} else {

Loading…
Cancel
Save