forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -192,7 +192,7 @@ void createVenv(const FilePath &python,
|
|||||||
|
|
||||||
bool isVenvPython(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)
|
bool venvIsUsable(const FilePath &python)
|
||||||
|
Reference in New Issue
Block a user