From c7e91245005b3209fd32ab1064d8bcf3ddaed801 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sun, 17 Nov 2024 12:52:26 +0100 Subject: fix bug moving between sub folders display same folder on move/remove use match statement in extract.py now that we are on python 3.11 --- src/jwebmail/__init__.py | 6 +++--- src/jwebmail/model/read_mails.py | 2 +- src/jwebmail/webmail.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/jwebmail') diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index d692c30..ff6d17c 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -36,7 +36,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.6.0.dev0" +__version__ = "2.6.0.dev1" csrf = CSRFProtect() @@ -46,9 +46,9 @@ def validate_config(app): assert "@" in conf["JWEBMAIL"]["ADMIN_MAIL"] - assert os_path.abspath(conf["JWEBMAIL"]["READ_MAILS"]["BACKEND"]) + assert os_path.isfile(conf["JWEBMAIL"]["READ_MAILS"]["BACKEND"]) - assert os_path.abspath( + assert os_path.isfile( conf["JWEBMAIL"]["READ_MAILS"].setdefault("AUTHENTICATOR", "qmail-authuser") ) diff --git a/src/jwebmail/model/read_mails.py b/src/jwebmail/model/read_mails.py index 633c358..5c63bdd 100644 --- a/src/jwebmail/model/read_mails.py +++ b/src/jwebmail/model/read_mails.py @@ -116,7 +116,7 @@ class QMailAuthuser: def add_folder(self, name): req = pb2.AddFolderReq(name=name) - resp = self.build_and_run("add_folder", req.SerializeToString()) + resp = self.build_and_run("add-folder", req.SerializeToString()) r = pb2.AddFolderResp() r.ParseFromString(resp) return r.status diff --git a/src/jwebmail/webmail.py b/src/jwebmail/webmail.py index 9c446c2..7b2e352 100644 --- a/src/jwebmail/webmail.py +++ b/src/jwebmail/webmail.py @@ -203,7 +203,7 @@ def move(folder=""): get_read_mails_logged_in().move(m, folder, to_folder) flash(gettext("succ_move")) - return redirect(url_for("displayheaders"), 303) + return redirect(url_for("displayheaders", folder=folder), 303) def remove(folder=""): @@ -224,7 +224,7 @@ def remove(folder=""): get_read_mails_logged_in().move(m, folder, "Trash") flash(gettext("succ_remove")) - return redirect(url_for("displayheaders"), 303) + return redirect(url_for("displayheaders", folder=folder), 303) def sendmail(): -- cgit v1.2.3