From d5a7f6cdc77c42877b7babc084a9ab035a74e346 Mon Sep 17 00:00:00 2001 From: VladiMihaylenko Date: Fri, 1 Sep 2017 18:13:30 +0300 Subject: Special format for a file while which is on an applying process. --- storage/diff_scheme/diff_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'storage') diff --git a/storage/diff_scheme/diff_manager.cpp b/storage/diff_scheme/diff_manager.cpp index 4358cda4f9..d6dfcb63df 100644 --- a/storage/diff_scheme/diff_manager.cpp +++ b/storage/diff_scheme/diff_manager.cpp @@ -72,7 +72,9 @@ void Manager::ApplyDiff(ApplyDiffParams && p, std::functionGetPath(MapOptions::Map); string const newMwmPath = diffFile->GetPath(MapOptions::Map); - result = generator::mwm_diff::ApplyDiff(oldMwmPath, newMwmPath, diffPath); + string const diffApplyingInProgressPath = newMwmPath + DIFF_APPLYING_FILE_EXTENSION; + result = generator::mwm_diff::ApplyDiff(oldMwmPath, diffApplyingInProgressPath, diffPath) && + my::RenameFileX(diffApplyingInProgressPath, newMwmPath); } diffFile->DeleteFromDisk(MapOptions::Diff); -- cgit v1.2.3