From 2d0696e048ea6f3195aec53da0be2f54c174c42f Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 3 Oct 2021 19:35:51 +0200 Subject: [PATCH] allow appending mte in volflags --- copyparty/authsrv.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 943b8b3d..312e1cf1 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -356,7 +356,7 @@ class VFS(object): if not dbv: return self, vrem - vrem = [self.vpath[len(dbv.vpath) + 1 :], vrem] + vrem = [self.vpath[len(dbv.vpath) :].lstrip("/"), vrem] vrem = "/".join([x for x in vrem if x]) return dbv, vrem @@ -880,6 +880,10 @@ class AuthSrv(object): # default tag cfgs if unset if "mte" not in vol.flags: vol.flags["mte"] = self.args.mte + elif vol.flags["mte"].startswith("+"): + vol.flags["mte"] = ",".join( + x for x in [self.args.mte, vol.flags["mte"][1:]] if x + ) if "mth" not in vol.flags: vol.flags["mth"] = self.args.mth