diff options
| author | David Schulz <david.schulz@qt.io> | 2024-01-16 12:27:21 +0100 |
|---|---|---|
| committer | David Schulz <david.schulz@qt.io> | 2024-01-17 13:33:47 +0000 |
| commit | 45ef64f4f9e7b48a0edd98a60748e1656ce5c122 (patch) | |
| tree | 5771057393c8616582d1daad7b3d7dbfb714d341 /src/plugins/python/pythonutils.cpp | |
| parent | 443ce8e164cf6ab28c01db6c1b319c341d27664d (diff) | |
Python: fix venv check
FilePath::contains only checks whether the passed string is inside the
path, and not whether the path contains a folder or file with the passed
string.
Change-Id: I20a1a9a52a9f9a436433848ac2eccd38666274d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
| -rw-r--r-- | src/plugins/python/pythonutils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 71cbc5763d2..63d1f7a7c30 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -192,7 +192,7 @@ void createVenv(const FilePath &python, bool isVenvPython(const FilePath &python) { - return python.parentDir().parentDir().contains("pyvenv.cfg"); + return python.parentDir().parentDir().pathAppended("pyvenv.cfg").exists(); } bool venvIsUsable(const FilePath &python) |
