|
|
|
@ -891,24 +891,24 @@ ImapConnection.prototype._move = function(which, uids, boxTo, cb) {
|
|
|
|
|
if (counter < deletedUIDs.length) {
|
|
|
|
|
self.delFlags(deletedUIDs[counter], 'Deleted', function(e) {
|
|
|
|
|
process.nextTick(function() {
|
|
|
|
|
fnMe.call(this, e, reentryCount, deletedUIDs, counter+1);
|
|
|
|
|
fnMe.call(this, e, reentryCount, deletedUIDs, counter + 1);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} else
|
|
|
|
|
fnMe.call(this, err, reentryCount+1, deletedUIDs);
|
|
|
|
|
fnMe.call(this, err, reentryCount + 1, deletedUIDs);
|
|
|
|
|
} else if (reentryCount === 2) {
|
|
|
|
|
self.addFlags(uids, 'Deleted', function(e) {
|
|
|
|
|
fnMe.call(this, e, reentryCount+1, deletedUIDs);
|
|
|
|
|
fnMe.call(this, e, reentryCount + 1, deletedUIDs);
|
|
|
|
|
});
|
|
|
|
|
} else if (reentryCount === 3) {
|
|
|
|
|
self.removeDeleted(function(e) {
|
|
|
|
|
fnMe.call(this, e, reentryCount+1, deletedUIDs);
|
|
|
|
|
fnMe.call(this, e, reentryCount + 1, deletedUIDs);
|
|
|
|
|
});
|
|
|
|
|
} else if (reentryCount === 4) {
|
|
|
|
|
if (counter < deletedUIDs.length) {
|
|
|
|
|
self.addFlags(deletedUIDs[counter], 'Deleted', function(e) {
|
|
|
|
|
process.nextTick(function() {
|
|
|
|
|
fnMe.call(this, e, reentryCount, deletedUIDs, counter+1);
|
|
|
|
|
fnMe.call(this, e, reentryCount, deletedUIDs, counter + 1);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} else
|
|
|
|
|