mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
webdav: mkdir semantics
This commit is contained in:
parent
ff04b72f62
commit
f14369e038
|
@ -1759,10 +1759,10 @@ class HttpCli(object):
|
||||||
fdir = os.path.dirname(fn)
|
fdir = os.path.dirname(fn)
|
||||||
|
|
||||||
if not bos.path.isdir(fdir):
|
if not bos.path.isdir(fdir):
|
||||||
raise Pebkac(500, "parent folder does not exist")
|
raise Pebkac(409, "parent folder does not exist")
|
||||||
|
|
||||||
if bos.path.isdir(fn):
|
if bos.path.isdir(fn):
|
||||||
raise Pebkac(500, "that folder exists already")
|
raise Pebkac(405, "that folder exists already")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
bos.mkdir(fn)
|
bos.mkdir(fn)
|
||||||
|
|
|
@ -162,6 +162,7 @@ HTTPCODE = {
|
||||||
403: "Forbidden",
|
403: "Forbidden",
|
||||||
404: "Not Found",
|
404: "Not Found",
|
||||||
405: "Method Not Allowed",
|
405: "Method Not Allowed",
|
||||||
|
409: "Conflict",
|
||||||
411: "Length Required",
|
411: "Length Required",
|
||||||
412: "Precondition Failed",
|
412: "Precondition Failed",
|
||||||
413: "Payload Too Large",
|
413: "Payload Too Large",
|
||||||
|
|
Loading…
Reference in a new issue