mirror of
https://github.com/9001/copyparty.git
synced 2025-08-23 03:42:21 -06:00
fix argv compat bug
This commit is contained in:
parent
f3dc6a217b
commit
806e7b5530
|
@ -388,15 +388,15 @@ def main(argv=None):
|
||||||
oa = ostr.split(":")
|
oa = ostr.split(":")
|
||||||
na = oa[:2]
|
na = oa[:2]
|
||||||
for opt in oa[2:]:
|
for opt in oa[2:]:
|
||||||
if opt and (opt[0] == "a" or (len(opt) > 1 and "," not in opt)):
|
if re.match("c[^,]", opt):
|
||||||
|
mod = True
|
||||||
|
na.append("c," + opt[2:])
|
||||||
|
elif re.sub("^[rwmd]*", "", opt) and "," not in opt:
|
||||||
mod = True
|
mod = True
|
||||||
perm = opt[0]
|
perm = opt[0]
|
||||||
if perm == "a":
|
if perm == "a":
|
||||||
perm = "rw"
|
perm = "rw"
|
||||||
na.append(perm + "," + opt[1:])
|
na.append(perm + "," + opt[1:])
|
||||||
elif opt and opt.startswith("c") and not opt.startswith("c,"):
|
|
||||||
mod = True
|
|
||||||
na.append("c," + opt[2:])
|
|
||||||
else:
|
else:
|
||||||
na.append(opt)
|
na.append(opt)
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ class SvcHub(object):
|
||||||
start_log_thrs(self.log, args.log_thrs, 0)
|
start_log_thrs(self.log, args.log_thrs, 0)
|
||||||
|
|
||||||
# initiate all services to manage
|
# initiate all services to manage
|
||||||
self.asrv = AuthSrv(self.args, self.log, False)
|
self.asrv = AuthSrv(self.args, self.log)
|
||||||
if args.ls:
|
if args.ls:
|
||||||
self.asrv.dbg_ls()
|
self.asrv.dbg_ls()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue