mirror of
https://github.com/rclone/rclone.git
synced 2024-11-08 01:25:14 +01:00
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)
|
||||
})
|
||||
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 nil
|
||||
|
Loading…
Reference in New Issue
Block a user