Escapes destination path on copy and move #42

This commit is contained in:
Christoph Polcin 2022-01-27 16:27:44 +01:00
parent 3f8721cd4b
commit b5bd04e2b5

View File

@ -138,7 +138,7 @@ func (c *Client) propfind(path string, self bool, body string, resp interface{},
func (c *Client) doCopyMove(method string, oldpath string, newpath string, overwrite bool) (int, io.ReadCloser) {
rs, err := c.req(method, oldpath, nil, func(rq *http.Request) {
rq.Header.Add("Destination", Join(c.root, newpath))
rq.Header.Add("Destination", PathEscape(Join(c.root, newpath)))
if overwrite {
rq.Header.Add("Overwrite", "T")
} else {