mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
restore: Don't abort on delete errors
This commit is contained in:
parent
b80a8dcb5f
commit
808e495ec2
@ -189,16 +189,21 @@ fn allocate_and_collect(
|
||||
let path = entry.path();
|
||||
match &removed_dir {
|
||||
Some(dir) if path.starts_with(dir) => {}
|
||||
_ => {
|
||||
dest.remove_dir(path)
|
||||
.with_context(|| format!("error removing {path:?}"))?;
|
||||
removed_dir = Some(path.to_path_buf());
|
||||
}
|
||||
_ => match dest.remove_dir(path) {
|
||||
Ok(()) => {
|
||||
removed_dir = Some(path.to_path_buf());
|
||||
}
|
||||
Err(err) => {
|
||||
error!("error removing {path:?}: {err}");
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
(true, false, false) => {
|
||||
if let Err(err) = dest.remove_file(entry.path()) {
|
||||
error!("error removing {:?}: {err}", entry.path());
|
||||
}
|
||||
}
|
||||
(true, false, false) => dest
|
||||
.remove_file(entry.path())
|
||||
.with_context(|| format!("error removing {:?}", entry.path()))?,
|
||||
(false, _, _) => {
|
||||
additional_existing = true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user