Handle request errors in copymove

This commit is contained in:
Mark Severson 2021-06-29 22:01:35 -06:00 committed by Christoph Polcin
parent 86f8378cf1
commit 7ff61aa87b

View File

@ -142,7 +142,9 @@ func (c *Client) doCopyMove(method string, oldpath string, newpath string, overw
func (c *Client) copymove(method string, oldpath string, newpath string, overwrite bool) error {
s, data := c.doCopyMove(method, oldpath, newpath, overwrite)
if data != nil {
defer data.Close()
}
switch s {
case 201, 204: