[eye] dir making is moved to the first step of migration

This commit is contained in:
Arsentiy Milchakov 2018-10-26 15:15:34 +03:00 committed by Tatiana Yan
parent 2ba61caad8
commit 427834ba5e

View file

@ -122,6 +122,9 @@ bool Storage::AppendMapObjectEvent(std::vector<int8_t> const & src)
// static
void Storage::Migrate()
{
if (!GetPlatform().MkDirChecked(GetEyeDir()))
return;
auto const oldPath = GetPlatform().WritablePathForFile("metrics");
if (!GetPlatform().IsFileExistsByFullPath(oldPath))
return;
@ -132,9 +135,6 @@ void Storage::Migrate()
return;
}
if (!GetPlatform().MkDirChecked(GetEyeDir()))
return;
if (!base::CopyFileX(oldPath, GetInfoFilePath()))
return;