diff --git a/generator/generator_tests/camera_collector_tests.cpp b/generator/generator_tests/camera_collector_tests.cpp index 87dd70c849..9ebc31405c 100644 --- a/generator/generator_tests/camera_collector_tests.cpp +++ b/generator/generator_tests/camera_collector_tests.cpp @@ -101,6 +101,7 @@ public: GenerateInfo genInfo; // Generate intermediate data. + genInfo.m_cacheDir = writableDir; genInfo.m_intermediateDir = writableDir; genInfo.m_nodeStorageType = feature::GenerateInfo::NodeStorageType::Index; genInfo.m_osmFileName = base::JoinPath(writableDir, osmRelativePath); diff --git a/generator/generator_tests/speed_cameras_test.cpp b/generator/generator_tests/speed_cameras_test.cpp index 51859768b8..d4b0ab6781 100644 --- a/generator/generator_tests/speed_cameras_test.cpp +++ b/generator/generator_tests/speed_cameras_test.cpp @@ -172,6 +172,7 @@ void TestSpeedCameraSectionBuilding(string const & osmContent, CameraMap const & GenerateInfo genInfo; genInfo.m_fileName = kTestMwm; genInfo.m_bucketNames.push_back(kTestMwm); + genInfo.m_cacheDir = testDirFullPath; genInfo.m_tmpDir = testDirFullPath; genInfo.m_targetDir = testDirFullPath; genInfo.m_intermediateDir = testDirFullPath; diff --git a/generator/generator_tests_support/test_mwm_builder.cpp b/generator/generator_tests_support/test_mwm_builder.cpp index e01321214f..eea105e0ef 100644 --- a/generator/generator_tests_support/test_mwm_builder.cpp +++ b/generator/generator_tests_support/test_mwm_builder.cpp @@ -136,6 +136,7 @@ void TestMwmBuilder::Finish() GenerateInfo info; info.m_targetDir = m_file.GetDirectory(); info.m_tmpDir = m_file.GetDirectory(); + info.m_intermediateDir = m_file.GetDirectory(); info.m_versionDate = static_cast(base::YYMMDDToSecondsSinceEpoch(m_version)); CHECK(GenerateFinalFeatures(info, m_file.GetCountryFile().GetName(), m_type), ("Can't sort features.")); diff --git a/platform/local_country_file.cpp b/platform/local_country_file.cpp index 074283e464..68f833580f 100644 --- a/platform/local_country_file.cpp +++ b/platform/local_country_file.cpp @@ -28,6 +28,10 @@ LocalCountryFile::LocalCountryFile(string const & directory, CountryFile const & void LocalCountryFile::SyncWithDisk() { + // World files from resources have an empty directory. See todo in the header. + if (m_directory.empty()) + return; + m_files = {}; uint64_t size = 0; diff --git a/platform/platform.cpp b/platform/platform.cpp index 41b0951a5b..d41d6e1de3 100644 --- a/platform/platform.cpp +++ b/platform/platform.cpp @@ -321,7 +321,7 @@ bool Platform::MkDirChecked(string const & dirName) bool Platform::MkDirRecursively(string const & dirName) { string::value_type const sep[] = { base::GetNativeSeparator(), 0}; - string path = strings::StartsWith(dirName, sep) ? sep : ""; + string path = strings::StartsWith(dirName, sep) ? sep : "."; auto const tokens = strings::Tokenize(dirName, sep); for (auto const & t : tokens) { diff --git a/storage/storage.cpp b/storage/storage.cpp index dc4e64307a..8207c16b3d 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -249,7 +249,7 @@ void Storage::RegisterAllLocalMaps(bool enableDiffs) if (IsLeaf(countryId)) RegisterCountryFiles(countryId, localFile.GetDirectory(), localFile.GetVersion()); else - RegisterFakeCountryFiles(localFile); + RegisterFakeCountryFiles(localFile); // Also called for Worlds from resources. LOG(LINFO, ("Found file:", name, "in directory:", localFile.GetDirectory()));