From f6eb5173c9cd20ce1506b3173b313675e9d6820d Mon Sep 17 00:00:00 2001 From: Ming-Hung Tsai Date: Sat, 2 Oct 2021 01:26:29 +0800 Subject: [PATCH] [era_restore] 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. --- era/era_restore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/era/era_restore.cc b/era/era_restore.cc index 27dcadc..a99f763 100644 --- a/era/era_restore.cc +++ b/era/era_restore.cc @@ -37,7 +37,7 @@ namespace { bool metadata_touched = false; try { block_manager::ptr bm = open_bm(*fs.output, block_manager::READ_WRITE); - file_utils::check_file_exists(*fs.output, false); + file_utils::check_file_exists(*fs.input); metadata_touched = true; metadata::ptr md(new metadata(bm, metadata::CREATE)); emitter::ptr restorer = create_restore_emitter(*md);