Show More
@@ -921,19 +921,12 b' class InteractiveShell(SingletonConfigurable):' | |||||
921 | while p.is_symlink(): |
|
921 | while p.is_symlink(): | |
922 | p = Path(os.readlink(p)) |
|
922 | p = Path(os.readlink(p)) | |
923 | paths.append(p.resolve()) |
|
923 | paths.append(p.resolve()) | |
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 |
|
||||
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 |
|
928 | |||
936 |
if any( |
|
929 | if any(p_venv == p.parents[1] 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