From b28087fcf9cd182b5ba9fef5fbc655ea710f93e2 Mon Sep 17 00:00:00 2001 From: VladiMihaylenko Date: Wed, 23 May 2018 18:38:55 +0300 Subject: [PATCH] [ugc] Moved index emplacing out of exception handler --- ugc/storage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ugc/storage.cpp b/ugc/storage.cpp index 7ef47d9b97..f602560c21 100644 --- a/ugc/storage.cpp +++ b/ugc/storage.cpp @@ -127,7 +127,6 @@ Storage::SettingResult SetGenericUGCUpdate( { FileWriter w(ugcFilePath, FileWriter::Op::OP_APPEND); Serialize(w, ugc, version); - indexes.emplace_back(move(index)); } catch (FileWriter::Exception const & exception) { @@ -135,6 +134,7 @@ Storage::SettingResult SetGenericUGCUpdate( return Storage::SettingResult::WritingError; } + indexes.emplace_back(move(index)); return Storage::SettingResult::Success; } } // namespace