From 974ca773be0910acfba4f298f6aad4b994791713 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 9 Mar 2023 21:49:29 +0000 Subject: [PATCH] just to be extra sure --- copyparty/up2k.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 7d9ea017..6ca22781 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -2283,8 +2283,17 @@ class Up2k(object): else: # symlink to the client-provided name, # returning the previous upload info - if src in self.busy_aps or ( - wark in reg and "done" not in reg[wark] + psrc = src + ".PARTIAL" + if self.args.dotpart: + m = re.match(r"(.*[\\/])(.*)", psrc) + if m: # always true but... + zs1, zs2 = m.groups() + psrc = zs1 + "." + zs2 + + if ( + src in self.busy_aps + or psrc in self.busy_aps + or (wark in reg and "done" not in reg[wark]) ): raise Pebkac( 422, "source file busy; please try again later"