dont allow multiple volumes at the same fs-path

This commit is contained in:
ed 2023-02-05 21:16:36 +00:00
parent 6939ca768b
commit 87d835ae37

View file

@ -690,12 +690,16 @@ class AuthSrv(object):
raise Exception("invalid config") raise Exception("invalid config")
if src in mount.values(): if src in mount.values():
t = "warning: filesystem-path [{}] mounted in multiple locations:" t = "filesystem-path [{}] mounted in multiple locations:"
t = t.format(src) t = t.format(src)
for v in [k for k, v in mount.items() if v == src] + [dst]: for v in [k for k, v in mount.items() if v == src] + [dst]:
t += "\n /{}".format(v) t += "\n /{}".format(v)
self.log(t, c=3) 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 mount[dst] = src
daxs[dst] = AXS() daxs[dst] = AXS()