mirror of
https://github.com/restic/restic.git
synced 2026-11-21 13:02:42 +00:00
When loading or iterating a directory tree failed, traverseTreeInner returned a nil file list together with the error. If the error handler ignored the error, the caller still called leaveDir with that nil list, and restore --delete removed every existing entry of the directory in the target, even though the expected content was simply unknown. Force disable deletion in that case, the same way it is already done for invalid node names. Signed-off-by: Dean Chen <862469039@qq.com>
9 lines
419 B
Plaintext
9 lines
419 B
Plaintext
Bugfix: Do not delete files in directories whose tree cannot be loaded
|
|
|
|
When `restore --delete` failed to load or read the tree of a directory, for
|
|
example because a pack file was missing, restic reported an error but then
|
|
deleted all existing content of that directory in the target. Restic now
|
|
disables deletion for the rest of the restore when a tree cannot be loaded.
|
|
|
|
https://github.com/restic/restic/issues/22181
|