mirror of
https://github.com/9001/copyparty.git
synced 2026-01-12 15:52:39 -07:00
splashpage: don't add trailing slash to filevols;
it prevented opening the link on Windows CE 4.20 (internet explorer 4.01)
This commit is contained in:
parent
2f3591d036
commit
80a3749238
|
|
@ -436,6 +436,7 @@ class VFS(object):
|
||||||
self.js_htm = ""
|
self.js_htm = ""
|
||||||
self.all_vols: dict[str, VFS] = {} # flattened recursive
|
self.all_vols: dict[str, VFS] = {} # flattened recursive
|
||||||
self.all_nodes: dict[str, VFS] = {} # also jumpvols/shares
|
self.all_nodes: dict[str, VFS] = {} # also jumpvols/shares
|
||||||
|
self.all_fvols: dict[str, VFS] = {} # volumes which are files
|
||||||
|
|
||||||
if realpath:
|
if realpath:
|
||||||
rp = realpath + ("" if realpath.endswith(os.sep) else os.sep)
|
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),)
|
zs = "select %s from up where rd=? and fn=?" % (", ".join(up_q),)
|
||||||
vol.flags["ls_q_m"] = (zs if up_m else "", up_m)
|
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():
|
for vol in vfs.all_nodes.values():
|
||||||
if not vol.flags.get("is_file"):
|
if not vol.flags.get("is_file"):
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
|
|
@ -5359,6 +5359,13 @@ class HttpCli(object):
|
||||||
[("/" + x).rstrip("/") + "/" for x in y]
|
[("/" + x).rstrip("/") + "/" for x in y]
|
||||||
for y in [self.rvol, self.wvol, self.avol]
|
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 = []
|
ups = []
|
||||||
now = time.time()
|
now = time.time()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue