mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
backup: do not fail backup is some parent folder is inaccessible
Handle errors for parent directories of backup directories in the same way as all other file access errors during a backup.
This commit is contained in:
@@ -723,8 +723,14 @@ func (arch *Archiver) saveTree(ctx context.Context, snPath string, atree *tree,
|
|||||||
arch.trackItem(snItem, oldNode, n, is, time.Since(start))
|
arch.trackItem(snItem, oldNode, n, is, time.Since(start))
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
err = arch.error(join(snPath, name), err)
|
||||||
|
if err == nil {
|
||||||
|
// ignore error
|
||||||
|
continue
|
||||||
|
}
|
||||||
return futureNode{}, 0, err
|
return futureNode{}, 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes = append(nodes, fn)
|
nodes = append(nodes, fn)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user