From 806e7b55300655a7462d70bfdcaad3bd21ba08b8 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 26 Jul 2021 19:40:12 +0200 Subject: [PATCH] fix argv compat bug --- copyparty/__main__.py | 8 ++++---- copyparty/svchub.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/copyparty/__main__.py b/copyparty/__main__.py index adabb1e2..b91d620c 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -388,15 +388,15 @@ def main(argv=None): oa = ostr.split(":") na = 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 perm = opt[0] if perm == "a": perm = "rw" na.append(perm + "," + opt[1:]) - elif opt and opt.startswith("c") and not opt.startswith("c,"): - mod = True - na.append("c," + opt[2:]) else: na.append(opt) diff --git a/copyparty/svchub.py b/copyparty/svchub.py index 78cd953b..d361a20b 100644 --- a/copyparty/svchub.py +++ b/copyparty/svchub.py @@ -55,7 +55,7 @@ class SvcHub(object): start_log_thrs(self.log, args.log_thrs, 0) # initiate all services to manage - self.asrv = AuthSrv(self.args, self.log, False) + self.asrv = AuthSrv(self.args, self.log) if args.ls: self.asrv.dbg_ls()