minor change

This commit is contained in:
Roy Qu 2023-09-21 16:37:22 +08:00
parent 7b5fa255da
commit 8ea94b3e26
1 changed files with 3 additions and 1 deletions

View File

@ -3899,7 +3899,9 @@ void Settings::Environment::doSave()
saveValue("current_folder",mCurrentFolder);
saveValue("default_open_folder",mDefaultOpenFolder);
QString terminalPath = mTerminalPath;
terminalPath.replace(pSettings->dirs().appDir(), "%*APP_DIR*%");
if (terminalPath.startsWith(pSettings->dirs().appDir())) {
terminalPath="%*APP_DIR*%"+terminalPath.mid(pSettings->dirs().appDir().length());
}
saveValue("terminal_path",terminalPath);
saveValue("terminal_arguments_pattern",mTerminalArgumentsPattern);