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; modified = true;
}, },
Err(err) => { Err(err) => {
warn!("Problem detected: inode {:?} is corrupt\n\tcaused by: {}", path.join(name), err); if repair {
info!("Removing broken inode from backup"); warn!("Problem detected: inode {:?} is corrupt\n\tcaused by: {}", path.join(name), err);
removed.push(name.to_string()); info!("Removing broken inode from backup");
modified = true; removed.push(name.to_string());
modified = true;
} else {
return Err(err)
}
} }
} }
} }