From 924a996fa744bfdb8177f8692c3b7896171cde1f Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 5 Oct 2017 11:49:01 +0100 Subject: [PATCH] [era_restore] Ignore errors from zero_superblock. Since it's on the error path. --- era/era_restore.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/era/era_restore.cc b/era/era_restore.cc index 6eb9343..9ca0e93 100644 --- a/era/era_restore.cc +++ b/era/era_restore.cc @@ -45,9 +45,12 @@ namespace { parse_xml(*fs.input, restorer, fs.quiet); } catch (std::exception &e) { - if (metadata_touched) - file_utils::zero_superblock(*fs.output); cerr << e.what() << endl; + if (metadata_touched) + try { + file_utils::zero_superblock(*fs.output); + } catch (...) { + } return 1; }