Handle request errors in copymove
This commit is contained in:
parent
86f8378cf1
commit
7ff61aa87b
@ -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 {
|
func (c *Client) copymove(method string, oldpath string, newpath string, overwrite bool) error {
|
||||||
s, data := c.doCopyMove(method, oldpath, newpath, overwrite)
|
s, data := c.doCopyMove(method, oldpath, newpath, overwrite)
|
||||||
defer data.Close()
|
if data != nil {
|
||||||
|
defer data.Close()
|
||||||
|
}
|
||||||
|
|
||||||
switch s {
|
switch s {
|
||||||
case 201, 204:
|
case 201, 204:
|
||||||
|
Loading…
Reference in New Issue
Block a user