From 87d835ae37876d41448cc914d45502696fffcdba Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 5 Feb 2023 21:16:36 +0000 Subject: [PATCH] dont allow multiple volumes at the same fs-path --- copyparty/authsrv.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 364207e5..5eb370d4 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -690,12 +690,16 @@ class AuthSrv(object): raise Exception("invalid config") if src in mount.values(): - t = "warning: filesystem-path [{}] mounted in multiple locations:" + t = "filesystem-path [{}] mounted in multiple locations:" t = t.format(src) for v in [k for k, v in mount.items() if v == src] + [dst]: t += "\n /{}".format(v) self.log(t, c=3) + raise Exception("invalid config") + + if not bos.path.isdir(src): + self.log("warning: filesystem-path does not exist: {}".format(src), 3) mount[dst] = src daxs[dst] = AXS()