ENH: linux: create data dir when not exists
Change-Id: Icaf5f3a74b52e3ada5db6a4354df6584bbf669cf
This commit is contained in:
parent
6096de0020
commit
c25c1ba4eb
|
@ -1892,6 +1892,9 @@ void GUI_App::init_app_config()
|
|||
if (! wxGetEnv(wxS("XDG_CONFIG_HOME"), &dir) || dir.empty() )
|
||||
dir = wxFileName::GetHomeDir() + wxS("/.config");
|
||||
set_data_dir((dir + "/" + GetAppName()).ToUTF8().data());
|
||||
boost::filesystem::path data_dir_path(data_dir());
|
||||
if (!boost::filesystem::exists(data_dir_path))
|
||||
boost::filesystem::create_directory(data_dir_path);
|
||||
#endif
|
||||
} else {
|
||||
m_datadir_redefined = true;
|
||||
|
|
Loading…
Reference in New Issue