Don't retry when "Permission denied" occurs in local backend
This commit is contained in:
parent
f7c7c2f730
commit
7dab113035
2 changed files with 6 additions and 5 deletions
|
@ -91,9 +91,8 @@ func (b *Local) Save(ctx context.Context, h restic.Handle, rd restic.RewindReade
|
|||
filename := b.Filename(h)
|
||||
|
||||
defer func() {
|
||||
// Mark non-retriable errors as such (currently only
|
||||
// "no space left on device").
|
||||
if errors.Is(err, syscall.ENOSPC) {
|
||||
// Mark non-retriable errors as such
|
||||
if errors.Is(err, syscall.ENOSPC) || os.IsPermission(err) {
|
||||
err = backoff.Permanent(err)
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue