From e3031bdeecd7dcfe18c4ed7593655c52e720afdf Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 20 Jun 2021 00:00:50 +0000 Subject: [PATCH] fix up2k folder-upload --- copyparty/httpcli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 615f3ff5..a910a1c7 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -581,8 +581,10 @@ class HttpCli(object): if sub: try: dst = os.path.join(vfs.realpath, rem) - os.makedirs(fsenc(dst)) + if not os.path.isdir(fsenc(dst)): + os.makedirs(fsenc(dst)) except OSError as ex: + self.log("makedirs failed [{}]".format(dst)) if ex.errno == 13: raise Pebkac(500, "the server OS denied write-access")