Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2017-09-01 18:13:30 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2017-09-13 16:25:50 +0300
commitd5a7f6cdc77c42877b7babc084a9ab035a74e346 (patch)
tree13600faa009a541a009bfa2188d6aa907d8a7c61 /storage
parent29eb449afb3d249946938f96b4dbe0b47cd428ea (diff)
Special format for a file while which is on an applying process.
Diffstat (limited to 'storage')
-rw-r--r--storage/diff_scheme/diff_manager.cpp4
1 files changed, 3 insertions, 1 deletions
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::function<void(bool const resu
string const oldMwmPath = p.m_oldMwmFile->GetPath(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);