mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
move -volflag
warning to avoid false positives
This commit is contained in:
parent
65a7706f77
commit
d779525500
|
@ -1584,12 +1584,8 @@ class AuthSrv(object):
|
||||||
for vol in vfs.all_vols.values():
|
for vol in vfs.all_vols.values():
|
||||||
unknown_flags = set()
|
unknown_flags = set()
|
||||||
for k, v in vol.flags.items():
|
for k, v in vol.flags.items():
|
||||||
stripped = k.lstrip("-")
|
ks = k.lstrip("-")
|
||||||
if k != stripped and stripped not in vol.flags:
|
if ks not in flagdescs and ks not in k_ign:
|
||||||
t = "WARNING: the config for volume [/%s] tried to remove volflag [%s] by specifying [%s] but that volflag was not already set"
|
|
||||||
self.log(t % (vol.vpath, stripped, k), 3)
|
|
||||||
k = stripped
|
|
||||||
if k not in flagdescs and k not in k_ign:
|
|
||||||
unknown_flags.add(k)
|
unknown_flags.add(k)
|
||||||
if unknown_flags:
|
if unknown_flags:
|
||||||
t = "WARNING: the config for volume [/%s] has unrecognized volflags; will ignore: '%s'"
|
t = "WARNING: the config for volume [/%s] has unrecognized volflags; will ignore: '%s'"
|
||||||
|
@ -2181,8 +2177,13 @@ class AuthSrv(object):
|
||||||
for vol in vfs.all_nodes.values():
|
for vol in vfs.all_nodes.values():
|
||||||
for k in list(vol.flags.keys()):
|
for k in list(vol.flags.keys()):
|
||||||
if re.match("^-[^-]+$", k):
|
if re.match("^-[^-]+$", k):
|
||||||
vol.flags.pop(k[1:], None)
|
|
||||||
vol.flags.pop(k)
|
vol.flags.pop(k)
|
||||||
|
zs = k[1:]
|
||||||
|
if zs in vol.flags:
|
||||||
|
vol.flags.pop(k[1:])
|
||||||
|
else:
|
||||||
|
t = "WARNING: the config for volume [/%s] tried to remove volflag [%s] by specifying [%s] but that volflag was not already set"
|
||||||
|
self.log(t % (vol.vpath, zs, k), 3)
|
||||||
|
|
||||||
if vol.flags.get("dots"):
|
if vol.flags.get("dots"):
|
||||||
for name in vol.axs.uread:
|
for name in vol.axs.uread:
|
||||||
|
|
Loading…
Reference in a new issue