Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/features/projectManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class PythonProjectManagerImpl implements PythonProjectManager {

// For each override, resolve its path and add as a project if not already present
for (const o of overrides) {
let uri: Uri | undefined = undefined;
let UriFromWorkspace: Uri | undefined = undefined;
// if override has a workspace property, resolve the path relative to that workspace
if (o.workspace) {
//
Expand All @@ -76,14 +76,13 @@ export class PythonProjectManagerImpl implements PythonProjectManager {
if (workspaceFolder.uri.toString() !== w.uri.toString()) {
continue; // skip if the workspace is not the same as the current workspace
}
uri = Uri.file(path.resolve(workspaceFolder.uri.fsPath, o.path));
UriFromWorkspace = Uri.file(path.resolve(workspaceFolder.uri.fsPath, o.path));
}
}
if (uri === undefined) {
uri = Uri.file(path.resolve(w.uri.fsPath, o.path));
}
const uri = UriFromWorkspace ? UriFromWorkspace : Uri.file(path.resolve(w.uri.fsPath, o.path));

// Check if the project already exists in the newProjects array
if (!newProjects.some((p) => p.uri.toString() === uri.toString())) {
if (!newProjects.some((p) => p.uri.toString() === uri.toString())) {
newProjects.push(new PythonProjectsImpl(o.path, uri));
}
}
Expand Down