Skip to content

Commit

Permalink
Do not filter using scheme when filtering environments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Aug 22, 2023
1 parent cfbf1f3 commit 4171267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/client/common/utils/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ export function getURIFilter(
}
const uriRoot = `${uriPath}/`;
function filter(candidate: Uri): boolean {
if (candidate.scheme !== uri.scheme) {
return false;
}
// Do not compare schemes as it is sometimes not available, in
// which case file is assumed as scheme.
let candidatePath = candidate.path;
while (candidatePath.endsWith('/')) {
candidatePath = candidatePath.slice(0, -1);
Expand Down
8 changes: 7 additions & 1 deletion src/client/pythonEnvironments/base/info/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ export function areEnvsDeepEqual(env1: PythonEnvInfo, env2: PythonEnvInfo): bool
env2Clone.source = env2Clone.source.sort();
const searchLocation1 = env1.searchLocation?.fsPath ?? '';
const searchLocation2 = env2.searchLocation?.fsPath ?? '';
return isEqual(env1Clone, env2Clone) && arePathsSame(searchLocation1, searchLocation2);
const searchLocation1Scheme = env1.searchLocation?.scheme ?? '';
const searchLocation2Scheme = env2.searchLocation?.scheme ?? '';
return (
isEqual(env1Clone, env2Clone) &&
arePathsSame(searchLocation1, searchLocation2) &&
searchLocation1Scheme === searchLocation2Scheme
);
}

/**
Expand Down

0 comments on commit 4171267

Please sign in to comment.