mirror of https://github.com/dswd/zvault
Only repairing backups with --repair
This commit is contained in:
parent
2885dfc933
commit
66e56b9b0c
|
@ -226,10 +226,14 @@ impl Repository {
|
||||||
modified = true;
|
modified = true;
|
||||||
},
|
},
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
if repair {
|
||||||
warn!("Problem detected: inode {:?} is corrupt\n\tcaused by: {}", path.join(name), err);
|
warn!("Problem detected: inode {:?} is corrupt\n\tcaused by: {}", path.join(name), err);
|
||||||
info!("Removing broken inode from backup");
|
info!("Removing broken inode from backup");
|
||||||
removed.push(name.to_string());
|
removed.push(name.to_string());
|
||||||
modified = true;
|
modified = true;
|
||||||
|
} else {
|
||||||
|
return Err(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue