FIX: Change current dirtory of application

Change-Id: I5e070e186cf581643521b4a96d457c3d92699fc5
Jira: none
This commit is contained in:
chunmao.guo 2023-10-07 12:24:46 +08:00 committed by Lane.Wei
parent 52b816b657
commit 0bf2fa181a
1 changed files with 2 additions and 0 deletions

View File

@ -2120,6 +2120,8 @@ void GUI_App::init_app_config()
if (!boost::filesystem::exists(data_dir_path))
boost::filesystem::create_directory(data_dir_path);
set_data_dir(data_dir);
// Change current dirtory of application
chdir(encode_path((data_dir + "/log").c_str()).c_str());
} else {
m_datadir_redefined = true;
}