autoarchive icon indicating copy to clipboard operation
autoarchive copied to clipboard

Archive hangs on trying to delete messages when set to 'mark for deletion' (0) in TB

Open darrenkenny opened this issue 10 years ago • 1 comments

When running the latest version of Auto Archive, I'm experiencing a hang after it has transferred 50 messages, and is meant to wait to continue.

It appears to be around the time that it's deleting the messages.

Looking in the code, it looks like it is not doing the correct thing when there is not Trash to move messages to because TB is set to simply 'mark for delete' as opposed to moving to Trash (which is effectively 'copy to Trash and then mark for delete'.

The last message I see output is from:

autoArchiveLog.info('srcFolder:' + srcFolder.URI + " is trash? " + isTrashFolder);

So this made me take a look here.

The code in archiveService.jsm looks for:

let realDelete = deleteModel == 2 || isTrashFolder;

and then is passing that in to deleteMessges().

In my case deleteModel has a value of 0. So I'm not sure this is then doing the correct thing.

But even after trying to patch it to allow 'realDelete' to evaluate to True for 0 or 2, it still seems to be hanging, and I can't see where.

Any ideas on where to look to see where it's getting stuck? and a possible fix?

After doing a 'Stop Now' and restarting, I often see a 'messages already exist' type message, which suggests it never marked them for deletion in the source folder and ends up trying to copy them again.

darrenkenny avatar Aug 27 '15 12:08 darrenkenny

Any luck on fixing this one?

harkonnen0069 avatar Dec 14 '18 00:12 harkonnen0069