This commit is contained in:
ed 2026-06-13 11:15:20 +00:00
parent 22c3a3dd46
commit 5a8949d595
4 changed files with 10 additions and 3 deletions

View file

@ -123,6 +123,7 @@ from .util import (
unescape_cookie,
unquotep,
vjoin,
vjoins,
vol_san,
vroots,
vsplit,
@ -1919,7 +1920,7 @@ class HttpCli(object):
df = {}
fgen = itertools.chain([topdir], fgen)
vtop = vjoin(self.args.R, vjoin(vn.vpath, rem))
vtop = vjoins(self.args.R, vn.vpath, rem)
chunksz = 0x7FF8 # preferred by nginx or cf (dunno which)

View file

@ -22,6 +22,7 @@ from .util import (
quotep,
s3dec,
vjoin,
vjoins,
)
if HAVE_SQLITE3:
@ -437,7 +438,7 @@ class U2idx(object):
if rd.startswith("//") or fn.startswith("//"):
rd, fn = s3dec(rd, fn)
vp = vjoin(vjoin(vtop, rd), fn)
vp = vjoins(vtop, rd, fn)
if vp in seen_rps:
continue

View file

@ -70,6 +70,7 @@ from .util import (
ub64enc,
unhumanize,
vjoin,
vjoins,
vsplit,
w8b64dec,
w8b64enc,
@ -3190,7 +3191,7 @@ class Up2k(object):
c2 = None
for cur, dp_dir, dp_fn in lost:
t = "forgetting desynced db entry: %r"
self.log(t % ("/" + vjoin(vjoin(vfs.vpath, dp_dir), dp_fn)))
self.log(t % ("/" + vjoins(vfs.vpath, dp_dir, dp_fn)))
self.db_rm(cur, vfs.flags, dp_dir, dp_fn, cj["size"])
if c2 and c2 != cur:
c2.connection.commit()

View file

@ -2679,6 +2679,10 @@ def vjoin(rd: str, fn: str) -> str:
return rd or fn
def vjoins(*a: str) -> str:
return "/".join([x for x in a if x])
# url-join
def ujoin(rd: str, fn: str) -> str:
if rd and fn: