From e53b818e1bcc06a94fed3a4016f0055976350d8f Mon Sep 17 00:00:00 2001 From: Justus Flerlage Date: Sat, 9 Feb 2019 20:21:47 +0100 Subject: [PATCH] Added check of parentPath in createParentCollection --- requests.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/requests.go b/requests.go index 3753a75..b3e1f7f 100644 --- a/requests.go +++ b/requests.go @@ -165,5 +165,9 @@ func (c *Client) put(path string, stream io.Reader) int { func (c *Client) createParentCollection(itemPath string) (err error) { parentPath := path.Dir(itemPath) + if parentPath == "." { + return nil + } + return c.MkdirAll(parentPath, 0755) }