mirror of
https://github.com/9001/copyparty.git
synced 2025-12-27 16:07:52 -05:00
lifetime maxval; closes #926
This commit is contained in:
@@ -2597,6 +2597,15 @@ class AuthSrv(object):
|
||||
for x in drop:
|
||||
vol.flags.pop(x)
|
||||
|
||||
zi = vol.flags.get("lifetime") or 0
|
||||
zi2 = time.time() // (86400 * 365)
|
||||
zi3 = zi2 * 86400 * 365
|
||||
if zi < 0 or zi > zi3:
|
||||
t = "the lifetime of volume [/%s] (%d) exceeds max value (%d years; %d)"
|
||||
t = t % (vol.vpath, zi, zi2, zi3)
|
||||
self.log(t, 1)
|
||||
raise Exception(t)
|
||||
|
||||
# verify tags mentioned by -mt[mp] are used by -mte
|
||||
local_mtp = {}
|
||||
local_only_mtp = {}
|
||||
|
||||
Reference in New Issue
Block a user