From a09d4e2918f20bb8d62a6f4cbc132b5ea0fae12c Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 5 Jan 2022 09:58:42 +0100 Subject: [PATCH] Python: fix repl workdir Use the directory that contains the file not the file itself as the working directory for REPL. amends 4a42bcd4e8d2c73be426775597e8a58f5df6a3a8 Change-Id: Ia81efc3ef51a96a79918d358cd446de9f1ea082d Reviewed-by: Eike Ziller --- src/plugins/python/pythonutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 4174702c1f9..a98fdc449a3 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -518,7 +518,7 @@ void openPythonRepl(const FilePath &file, ReplType type) return project->projectDirectory(); return FilePath::fromString(QDir::currentPath()); } - return file; + return file.absolutePath(); }; const auto args = QStringList{"-i"} + replImportArgs(file, type);