[cache_repair] Avoid touching the output file by checking input file earlier
The output file has been checked by the caller, so there's no need to check the output file again.
This commit is contained in:
parent
5abb92838c
commit
6bd7741dfa
@ -32,7 +32,7 @@ namespace {
|
||||
int repair(string const &old_path, string const &new_path) {
|
||||
bool metadata_touched = false;
|
||||
try {
|
||||
file_utils::check_file_exists(new_path, false);
|
||||
file_utils::check_file_exists(old_path, false);
|
||||
metadata_touched = true;
|
||||
metadata_dump(open_metadata_for_read(old_path),
|
||||
output_emitter(new_path),
|
||||
|
Loading…
Reference in New Issue
Block a user