Show More
@@ -924,16 +924,9 b' class InteractiveShell(SingletonConfigurable):' | |||
|
924 | 924 | |
|
925 | 925 | # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible |
|
926 | 926 | if str(p_venv).startswith("\\cygdrive"): |
|
927 | p_venv = Path(str(p_venv)[11:]) | |
|
928 | elif len(str(p_venv)) >= 2 and str(p_venv)[1] == ":": | |
|
929 | p_venv = Path(str(p_venv)[2:]) | |
|
927 | p_venv = "C:" / Path(str(p_venv)[11:]) | |
|
930 | 928 | |
|
931 | if sys.platform == "win32": | |
|
932 | # On Windows there might be a mixture of lower-case and mixed-case paths | |
|
933 | p_venv = Path(str(p_venv).lower()) | |
|
934 | paths = [Path(str(p).lower()) for p in paths] | |
|
935 | ||
|
936 | if any(os.fspath(p_venv) in os.fspath(p) for p in paths): | |
|
929 | if any(p_venv == p.parents[1] for p in paths): | |
|
937 | 930 | # Our exe is inside or has access to the virtualenv, don't need to do anything. |
|
938 | 931 | return |
|
939 | 932 |
General Comments 0
You need to be logged in to leave comments.
Login now