mirror of
https://github.com/9001/copyparty.git
synced 2026-08-13 13:53:06 -06:00
show-hist: nested volumes notice
This commit is contained in:
parent
db68353e22
commit
2c8325a770
|
|
@ -2806,12 +2806,27 @@ 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)
|
||||||
|
|
||||||
for tab in (rhisttab, rdbpaths):
|
for vn1 in vfs.all_nodes.values():
|
||||||
for ap, vn in tab.items():
|
if "show_hist" in vn1.flags or not vn1.realpath:
|
||||||
if "show_hist" not in vn.flags and (
|
continue
|
||||||
ap == os.path.join(vn.realpath, ".hist")
|
ap = vn1.realpath.replace(os.sep, "/")
|
||||||
):
|
apS = ap.rstrip("/") + "/"
|
||||||
vn.add("", ".hist", ".hist")
|
for vn2 in vfs.all_nodes.values():
|
||||||
|
if not vn2.realpath:
|
||||||
|
continue
|
||||||
|
haps = [
|
||||||
|
vn2.histpath.replace(os.sep, "/"),
|
||||||
|
vn2.dbpath.replace(os.sep, "/"),
|
||||||
|
]
|
||||||
|
for hap in list(set(haps)):
|
||||||
|
if not hap.startswith(apS):
|
||||||
|
continue
|
||||||
|
zs = hap[len(apS) :]
|
||||||
|
if "/" in zs:
|
||||||
|
t = "note: /%s/%s gives access to %s"
|
||||||
|
self.log(t % (vn2.vpath, zs, hap), 3)
|
||||||
|
else:
|
||||||
|
vn1.add("", zs, zs)
|
||||||
|
|
||||||
vfs.all_fvols = {
|
vfs.all_fvols = {
|
||||||
zs: vol for zs, vol in vfs.all_vols.items() if "is_file" in vol.flags
|
zs: vol for zs, vol in vfs.all_vols.items() if "is_file" in vol.flags
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue