Only repairing backups with --repair

This commit is contained in:
Dennis Schwerdel 2017-04-16 21:47:02 +02:00
parent 2885dfc933
commit 66e56b9b0c
1 changed files with 8 additions and 4 deletions

View File

@ -226,10 +226,14 @@ impl Repository {
modified = true;
},
Err(err) => {
warn!("Problem detected: inode {:?} is corrupt\n\tcaused by: {}", path.join(name), err);
info!("Removing broken inode from backup");
removed.push(name.to_string());
modified = true;
if repair {
warn!("Problem detected: inode {:?} is corrupt\n\tcaused by: {}", path.join(name), err);
info!("Removing broken inode from backup");
removed.push(name.to_string());
modified = true;
} else {
return Err(err)
}
}
}
}