[editor] Get editor.config from writable path first.

Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
Viktor Govako 2022-03-28 12:05:19 +03:00
parent 930be4f3ba
commit 2cb4c1f5e3

View file

@ -13,6 +13,8 @@
#include "3party/pugixml/src/pugixml.hpp"
namespace editor
{
using namespace std;
namespace
@ -23,8 +25,8 @@ auto const kConfigFileName = "editor.config";
auto const kHashFileName = "editor.config.hash";
auto const kSynchroTimeout = chrono::hours(4);
auto const kRemoteHashUrl = "http://osmz.ru/mwm/editor.config.date";
auto const kRemoteConfigUrl = "http://osmz.ru/mwm/editor.config";
auto const kRemoteHashUrl = "https://cdn.organicmaps.app/editor.config.date";
auto const kRemoteConfigUrl = "https://cdn.organicmaps.app/editor.config";
string GetConfigFilePath() { return GetPlatform().WritablePathForFile(kConfigFileName); }
string GetHashFilePath() { return GetPlatform().WritablePathForFile(kHashFileName); }
@ -51,8 +53,6 @@ string RunSimpleHttpRequest(string const & url)
}
} // namespace
namespace editor
{
void Waiter::Interrupt()
{
{
@ -137,7 +137,8 @@ void ConfigLoader::LoadFromLocal(pugi::xml_document & doc)
try
{
reader = GetPlatform().GetReader(kConfigFileName);
// Get config file from WritableDir first.
reader = GetPlatform().GetReader(kConfigFileName, "wr");
}
catch (RootException const & ex)
{