##// END OF EJS Templates
Merge pull request #13150 from meeseeksmachine/auto-backport-of-pr-13140-on-7.x...
Blazej Michalik -
r26795:e60034bf merge
parent child Browse files
Show More
@@ -924,16 +924,9 b' class InteractiveShell(SingletonConfigurable):'
924
924
925 # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible
925 # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible
926 if str(p_venv).startswith("\\cygdrive"):
926 if str(p_venv).startswith("\\cygdrive"):
927 p_venv = Path(str(p_venv)[11:])
927 p_venv = "C:" / 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:])
930
928
931 if sys.platform == "win32":
929 if any(p_venv == p.parents[1] for p in paths):
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):
937 # Our exe is inside or has access to the virtualenv, don't need to do anything.
930 # Our exe is inside or has access to the virtualenv, don't need to do anything.
938 return
931 return
939
932
General Comments 0
You need to be logged in to leave comments. Login now