mirror of https://github.com/rclone/rclone.git
b2: ignore already_hidden error on remove
Sometimes (possibly through eventual consistency) b2 returns an already_hidden error on a delete. Ignore this since it is harmless.
This commit is contained in:
parent
ac7e1dbf62
commit
5aa706831f
|
@ -952,6 +952,13 @@ func (f *Fs) hide(Name string) error {
|
||||||
return f.shouldRetry(resp, err)
|
return f.shouldRetry(resp, err)
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if apiErr, ok := err.(*api.Error); ok {
|
||||||
|
if apiErr.Code == "already_hidden" {
|
||||||
|
// sometimes eventual consistency causes this, so
|
||||||
|
// ignore this error since it is harmless
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
return errors.Wrapf(err, "failed to hide %q", Name)
|
return errors.Wrapf(err, "failed to hide %q", Name)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue