From 80a3749238248ba888d7a37e0fc3bf2655f6bd78 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 2 Jan 2026 17:55:47 +0000 Subject: [PATCH] splashpage: don't add trailing slash to filevols; it prevented opening the link on Windows CE 4.20 (internet explorer 4.01) --- copyparty/authsrv.py | 5 +++++ copyparty/httpcli.py | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 70f1847a..b341c954 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -436,6 +436,7 @@ class VFS(object): self.js_htm = "" self.all_vols: dict[str, VFS] = {} # flattened recursive self.all_nodes: dict[str, VFS] = {} # also jumpvols/shares + self.all_fvols: dict[str, VFS] = {} # volumes which are files if realpath: rp = realpath + ("" if realpath.endswith(os.sep) else os.sep) @@ -2690,6 +2691,10 @@ class AuthSrv(object): zs = "select %s from up where rd=? and fn=?" % (", ".join(up_q),) vol.flags["ls_q_m"] = (zs if up_m else "", up_m) + vfs.all_fvols = { + zs: vol for zs, vol in vfs.all_vols.items() if "is_file" in vol.flags + } + for vol in vfs.all_nodes.values(): if not vol.flags.get("is_file"): continue diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 2782bd83..ad501906 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -5359,6 +5359,13 @@ class HttpCli(object): [("/" + x).rstrip("/") + "/" for x in y] for y in [self.rvol, self.wvol, self.avol] ] + for zs in self.asrv.vfs.all_fvols: + if not zs: + continue # webroot + zs2 = ("/" + zs).rstrip("/") + "/" + for zsl in (rvol, wvol, avol): + if zs2 in zsl: + zsl[zsl.index(zs2)] = zs2[:-1] ups = [] now = time.time()