File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed 
pythonEnvironments/base/info Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ function isUri(resource?: Uri | any): resource is Uri {
6060/** 
6161 * Create a filter func that determine if the given URI and candidate match. 
6262 * 
63-  * The scheme must match, as well as  path. 
63+  * Only compares  path. 
6464 * 
6565 * @param  checkParent - if `true`, match if the candidate is rooted under `uri` 
6666 * or if the candidate matches `uri` exactly. 
@@ -80,9 +80,8 @@ export function getURIFilter(
8080 } 
8181 const  uriRoot  =  `${ uriPath }  ; 
8282 function  filter ( candidate : Uri ) : boolean  { 
83-  if  ( candidate . scheme  !==  uri . scheme )  { 
84-  return  false ; 
85-  } 
83+  // Do not compare schemes as it is sometimes not available, in 
84+  // which case file is assumed as scheme. 
8685 let  candidatePath  =  candidate . path ; 
8786 while  ( candidatePath . endsWith ( '/' ) )  { 
8887 candidatePath  =  candidatePath . slice ( 0 ,  - 1 ) ; 
Original file line number Diff line number Diff line change @@ -87,7 +87,13 @@ export function areEnvsDeepEqual(env1: PythonEnvInfo, env2: PythonEnvInfo): bool
8787 env2Clone . source  =  env2Clone . source . sort ( ) ; 
8888 const  searchLocation1  =  env1 . searchLocation ?. fsPath  ??  '' ; 
8989 const  searchLocation2  =  env2 . searchLocation ?. fsPath  ??  '' ; 
90-  return  isEqual ( env1Clone ,  env2Clone )  &&  arePathsSame ( searchLocation1 ,  searchLocation2 ) ; 
90+  const  searchLocation1Scheme  =  env1 . searchLocation ?. scheme  ??  '' ; 
91+  const  searchLocation2Scheme  =  env2 . searchLocation ?. scheme  ??  '' ; 
92+  return  ( 
93+  isEqual ( env1Clone ,  env2Clone )  && 
94+  arePathsSame ( searchLocation1 ,  searchLocation2 )  && 
95+  searchLocation1Scheme  ===  searchLocation2Scheme 
96+  ) ; 
9197} 
9298
9399/** 
                         You can’t perform that action at this time. 
           
                  
0 commit comments