Browse Source

Tweaked error handling in copyMessageToFolder.OnStopCopy() and added more logging to OnStopRunningUrl().

1.1.101
Jorg Knobloch 2 years ago
parent
commit
78eeafe103
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      addon/content/TbHelper.js

+ 11
- 6
addon/content/TbHelper.js View File

@ -112,12 +112,22 @@ const TbHelper = {
OnStartRunningUrl() {},
OnStopRunningUrl() {
// This is not called for local and off-screen folders, hence we delete in `OnStopCopy()`.
if (statusCode !== 0) return;
if (statusCode !== 0) {
console.error(
`Not deleting message due to error ${statusCode}, folder="${msgFolder.name}", key=${msgHdr.messageKey}/${newKey}`,
);
return;
}
controller.log.debug("Triggering deletion from OnStopRunningUrl()");
this.deleteMsg();
},
OnStartCopy() {},
OnStopCopy(status) {
if (newKey) controller.newMessageKeys.push(newKey);
try {
tempFile.remove();
} catch (ex) {}
statusCode = status;
if (statusCode !== 0) {
console.error(
@ -126,11 +136,6 @@ const TbHelper = {
return;
}
if (newKey) controller.newMessageKeys.push(newKey);
try {
tempFile.remove();
} catch (ex) {}
if (msgFolder.folderURL.startsWith("mailbox:") ||
// IMAP's `OnStopRunningUrl()` does not run for off-screen folders.
(win && win.gDBView && win.gDBView.msgFolder != msgFolder) ||


Loading…
Cancel
Save