mirror of
https://github.com/9001/copyparty.git
synced 2026-11-21 14:46:33 +00:00
up2k nosub; closes #1611
This commit is contained in:
1 parent
eb4f1dddce
commit
ec4a95e1a5
1 file changed
+4
@@ -3251,6 +3251,8 @@ class HttpCli(object):
|
|||||||
dst = vfs.canonical(rem)
|
dst = vfs.canonical(rem)
|
||||||
try:
|
try:
|
||||||
if not bos.path.isdir(dst):
|
if not bos.path.isdir(dst):
|
||||||
|
if "nosub" in vfs.flags:
|
||||||
|
raise Pebkac(500, "no subdirectories allowed")
|
||||||
bos.makedirs(dst, vf=vfs.flags)
|
bos.makedirs(dst, vf=vfs.flags)
|
||||||
except OSError as ex:
|
except OSError as ex:
|
||||||
self.log("makedirs failed %r" % (dst,))
|
self.log("makedirs failed %r" % (dst,))
|
||||||
@@ -3262,6 +3264,8 @@ class HttpCli(object):
|
|||||||
raise Pebkac(400, "some file got your folder name")
|
raise Pebkac(400, "some file got your folder name")
|
||||||
|
|
||||||
raise Pebkac(500, min_ex())
|
raise Pebkac(500, min_ex())
|
||||||
|
except Pebkac:
|
||||||
|
raise
|
||||||
except:
|
except:
|
||||||
raise Pebkac(500, min_ex())
|
raise Pebkac(500, min_ex())
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user