From a3c3ca79cf45fe7ef48ac7c189089db531e714a4 Mon Sep 17 00:00:00 2001 From: mimo Date: Fri, 18 Nov 2016 18:06:01 +0000 Subject: [PATCH] Save the config file even it does not exist, patch by Vladislav Belov, fixes #4146 This was SVN commit r18960. --- source/i18n/L10n.cpp | 3 +-- source/ps/ConfigDB.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/i18n/L10n.cpp b/source/i18n/L10n.cpp index c822a10328..bff2f58ec9 100644 --- a/source/i18n/L10n.cpp +++ b/source/i18n/L10n.cpp @@ -93,8 +93,7 @@ bool L10n::SaveLocale(const Locale& locale) const return false; g_ConfigDB.SetValueString(CFG_USER, "locale", locale.getName()); - g_ConfigDB.WriteValueToFile(CFG_USER, "locale", locale.getName()); - return true; + return g_ConfigDB.WriteValueToFile(CFG_USER, "locale", locale.getName()); } bool L10n::ValidateLocale(const std::string& localeCode) const diff --git a/source/ps/ConfigDB.cpp b/source/ps/ConfigDB.cpp index 5a2f0601db..14428c977a 100644 --- a/source/ps/ConfigDB.cpp +++ b/source/ps/ConfigDB.cpp @@ -446,8 +446,7 @@ bool CConfigDB::WriteValueToFile(EConfigNamespace ns, const CStr& name, const CS TConfigMap newMap; m_Map[ns].swap(newMap); - if (!Reload(ns)) - return false; + Reload(ns); SetValueString(ns, name, value); bool ret = WriteFile(ns, path);