From 89b79ba267aa16f85024146b6ade3ea632d966f6 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 20 Jun 2021 17:59:27 +0200 Subject: [PATCH] fix histpath getting indexed on windows --- copyparty/authsrv.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 0f5cc6c5..ff5bed66 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -469,6 +469,17 @@ class AuthSrv(object): print(m.format(cfg_fn, self.line_ctr)) raise + # case-insensitive; normalize + if WINDOWS: + cased = {} + for k, v in mount.items(): + try: + cased[k] = fsdec(os.path.realpath(fsenc(v))) + except: + cased[k] = v + + mount = cased + if not mount: # -h says our defaults are CWD at root and read/write for everyone vfs = VFS(os.path.abspath("."), "", ["*"], ["*"])