From 8ea94b3e2683cfe999a35f5cce7c2244d578d707 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Thu, 21 Sep 2023 16:37:22 +0800 Subject: [PATCH] minor change --- RedPandaIDE/settings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 778340dc..59030d5b 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -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);