mirror of
https://github.com/9001/copyparty.git
synced 2025-10-05 10:49:30 +02:00
retry deleting busy files on windows:
some clients (clonezilla-webdav) rapidly create and delete files; this fails if copyparty is still hashing the file (usually the case) and the same thing can probably happen due to antivirus etc add global-option --rm-retry (volflag rm_retry) specifying for how long (and how quickly) to keep retrying the deletion default: retry for 5sec on windows, 0sec (disabled) on everything else because this is only a problem on windows
This commit is contained in:
parent
d999d3a921
commit
3313503ea5
8 changed files with 99 additions and 32 deletions
|
@ -1494,6 +1494,14 @@ class AuthSrv(object):
|
|||
if k in vol.flags:
|
||||
vol.flags[k] = float(vol.flags[k])
|
||||
|
||||
try:
|
||||
zs1, zs2 = vol.flags["rm_retry"].split("/")
|
||||
vol.flags["rm_re_t"] = float(zs1)
|
||||
vol.flags["rm_re_r"] = float(zs2)
|
||||
except:
|
||||
t = 'volume "/%s" has invalid rm_retry [%s]'
|
||||
raise Exception(t % (vol.vpath, vol.flags.get("rm_retry")))
|
||||
|
||||
for k1, k2 in IMPLICATIONS:
|
||||
if k1 in vol.flags:
|
||||
vol.flags[k2] = True
|
||||
|
@ -1505,8 +1513,8 @@ class AuthSrv(object):
|
|||
dbds = "acid|swal|wal|yolo"
|
||||
vol.flags["dbd"] = dbd = vol.flags.get("dbd") or self.args.dbd
|
||||
if dbd not in dbds.split("|"):
|
||||
t = "invalid dbd [{}]; must be one of [{}]"
|
||||
raise Exception(t.format(dbd, dbds))
|
||||
t = 'volume "/%s" has invalid dbd [%s]; must be one of [%s]'
|
||||
raise Exception(t % (vol.vpath, dbd, dbds))
|
||||
|
||||
# default tag cfgs if unset
|
||||
for k in ("mte", "mth", "exp_md", "exp_lg"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue