mirror of
https://github.com/9001/copyparty.git
synced 2025-10-04 10:19:21 +02:00
up2k: tristate option for overwriting files; closes #139
adds a third possible value for the `replace` property in handshakes: * absent or False: never overwrite an existing file on the server, and instead generate a new filename to avoid collision * True: always overwrite existing files on the server * "mt": only overwrite if client's last-modified is more recent (this is the new option) the new UI button toggles between all three options, defaulting to never-overwrite
This commit is contained in:
parent
6858cb066f
commit
e9f78ea70c
9 changed files with 58 additions and 16 deletions
|
@ -1956,11 +1956,7 @@ class AuthSrv(object):
|
|||
if vf not in vol.flags:
|
||||
vol.flags[vf] = getattr(self.args, ga)
|
||||
|
||||
for k in ("nrand",):
|
||||
if k not in vol.flags:
|
||||
vol.flags[k] = getattr(self.args, k)
|
||||
|
||||
zs = "forget_ip nrand u2abort ups_who zip_who"
|
||||
zs = "forget_ip nrand u2abort u2ow ups_who zip_who"
|
||||
for k in zs.split():
|
||||
if k in vol.flags:
|
||||
vol.flags[k] = int(vol.flags[k])
|
||||
|
@ -2436,6 +2432,7 @@ class AuthSrv(object):
|
|||
"u2j": self.args.u2j,
|
||||
"u2sz": self.args.u2sz,
|
||||
"u2ts": vf["u2ts"],
|
||||
"u2ow": vf["u2ow"],
|
||||
"frand": bool(vf.get("rand")),
|
||||
"lifetime": vn.js_ls["lifetime"],
|
||||
"u2sort": self.args.u2sort,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue