Python: fix repl workdir

Use the directory that contains the file not the file itself as the
working directory for REPL.

amends 4a42bcd4e8

Change-Id: Ia81efc3ef51a96a79918d358cd446de9f1ea082d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2022-01-05 09:58:42 +01:00
parent 22a2693917
commit a09d4e2918

View File

@@ -518,7 +518,7 @@ void openPythonRepl(const FilePath &file, ReplType type)
return project->projectDirectory(); return project->projectDirectory();
return FilePath::fromString(QDir::currentPath()); return FilePath::fromString(QDir::currentPath());
} }
return file; return file.absolutePath();
}; };
const auto args = QStringList{"-i"} + replImportArgs(file, type); const auto args = QStringList{"-i"} + replImportArgs(file, type);