From 8217f361cc7833999081b0624856695661fe1c51 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 7 Feb 2019 11:00:28 +0000 Subject: [PATCH] webdav: if MKCOL fails with 423 Locked assume the directory exists This fixes the integration tests with owncloud --- backend/webdav/webdav.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go index 3c2db188d..f77a37ccd 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go @@ -649,7 +649,8 @@ func (f *Fs) mkdir(dirPath string) error { err := f._mkdir(dirPath) if apiErr, ok := err.(*api.Error); ok { // already exists - if apiErr.StatusCode == http.StatusMethodNotAllowed || apiErr.StatusCode == http.StatusNotAcceptable { + // owncloud returns 423/StatusLocked if the create is already in progress + if apiErr.StatusCode == http.StatusMethodNotAllowed || apiErr.StatusCode == http.StatusNotAcceptable || apiErr.StatusCode == http.StatusLocked { return nil } // parent does not exist