[education/rkward] rkward/rbackend: Fix setting fixed working dir on startup

Thomas Friedrichsmeier null at kde.org
Thu Jul 11 06:37:11 BST 2024


Git commit f48ab788ab2db86930a540401570074082d7d25c by Thomas Friedrichsmeier.
Committed on 11/07/2024 at 05:36.
Pushed by tfry into branch 'master'.

Fix setting fixed working dir on startup

M  +1    -1    rkward/rbackend/rkrinterface.cpp

https://invent.kde.org/education/rkward/-/commit/f48ab788ab2db86930a540401570074082d7d25c

diff --git a/rkward/rbackend/rkrinterface.cpp b/rkward/rbackend/rkrinterface.cpp
index c0f7c6da3..f8b6c3340 100644
--- a/rkward/rbackend/rkrinterface.cpp
+++ b/rkward/rbackend/rkrinterface.cpp
@@ -454,7 +454,7 @@ void RInterface::handleRequest (RBackendRequest* request) {
 		});
 
 		QString cd_to = RKSettingsModuleGeneral::initialWorkingDirectory();
-		cd_to = QDir::currentPath();
+		if (cd_to.isEmpty()) cd_to = QDir::currentPath();
 		if (cd_to.isEmpty()) { // we must be in a non-existent dir. The backend will know better...
 			RInterface::issueCommand(new RCommand("setwd(\".\")\n", RCommand::App | RCommand::Sync), chain);
 		} else {


More information about the rkward-tracker mailing list