From 6a689231e5f728253d54da6dce53d6c3c98972c1 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 27 Sep 2021 10:50:44 +0200 Subject: [PATCH] Catch miss encoding exception while checking mailbox for commit bec53dc57d0196a9a4256983a8d8398afa5e987f --- mail/js/app.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 565ccdbc8f..f0e3b70ffc 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2450,13 +2450,19 @@ app.classes.mail = AppJS.extend( var rvMain = false; if ((obj_manager && _elems.length>1 && obj_manager.getAllSelected() && !_action.paste) || _action.id=='readall') { - // Avoid possibly doing select all action on not desired mailbox e.g. INBOX - for (let n=0;n<_elems.length;n++) + try { + // Avoid possibly doing select all action on not desired mailbox e.g. INBOX + for (let n=0;n<_elems.length;n++) + { + // drop the action if there's a mixedup mailbox found in the selected messages + if (atob(_elems[n].id.split("::")[3]) != tree.getSelectedNode().id.split("::")[1]) return; + } + }catch(e) { - // drop the action if there's a mixedup mailbox found in the selected messages - if (atob(_elems[n].id.split("::")[3]) != tree.getSelectedNode().id.split("::")[1]) return; + // continue } + if (_confirm) { var buttons = [