Do not perform config check if conf folder is redefined
This commit is contained in:
parent
00c86b2b7f
commit
6490456ec4
@ -883,6 +883,8 @@ void GUI_App::init_app_config()
|
|||||||
dir = wxFileName::GetHomeDir() + wxS("/.config");
|
dir = wxFileName::GetHomeDir() + wxS("/.config");
|
||||||
set_data_dir((dir + "/" + GetAppName()).ToUTF8().data());
|
set_data_dir((dir + "/" + GetAppName()).ToUTF8().data());
|
||||||
#endif
|
#endif
|
||||||
|
} else {
|
||||||
|
m_config_folder_redefined = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!app_config)
|
if (!app_config)
|
||||||
@ -915,6 +917,10 @@ void GUI_App::init_app_config()
|
|||||||
// returns true if found newer version and user agreed to use it
|
// returns true if found newer version and user agreed to use it
|
||||||
bool GUI_App::check_older_app_config(Semver current_version, bool backup)
|
bool GUI_App::check_older_app_config(Semver current_version, bool backup)
|
||||||
{
|
{
|
||||||
|
// If the config folder is redefined - do not check
|
||||||
|
if (m_config_folder_redefined)
|
||||||
|
return false;
|
||||||
|
|
||||||
// find other version app config (alpha / beta / release)
|
// find other version app config (alpha / beta / release)
|
||||||
std::string config_path = app_config->config_path();
|
std::string config_path = app_config->config_path();
|
||||||
boost::filesystem::path parent_file_path(config_path);
|
boost::filesystem::path parent_file_path(config_path);
|
||||||
|
@ -352,6 +352,7 @@ private:
|
|||||||
void check_updates(const bool verbose);
|
void check_updates(const bool verbose);
|
||||||
|
|
||||||
bool m_init_app_config_from_older { false };
|
bool m_init_app_config_from_older { false };
|
||||||
|
bool m_config_folder_redefined { false };
|
||||||
std::string m_older_data_dir_path;
|
std::string m_older_data_dir_path;
|
||||||
boost::optional<Semver> m_last_config_version;
|
boost::optional<Semver> m_last_config_version;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user