File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export class PythonProjectManagerImpl implements PythonProjectManager {
6767
6868 // For each override, resolve its path and add as a project if not already present
6969 for ( const o of overrides ) {
70- let uri : Uri | undefined = undefined ;
70+ let UriFromWorkspace : Uri | undefined = undefined ;
7171 // if override has a workspace property, resolve the path relative to that workspace
7272 if ( o . workspace ) {
7373 //
@@ -76,14 +76,13 @@ export class PythonProjectManagerImpl implements PythonProjectManager {
7676 if ( workspaceFolder . uri . toString ( ) !== w . uri . toString ( ) ) {
7777 continue ; // skip if the workspace is not the same as the current workspace
7878 }
79- uri = Uri . file ( path . resolve ( workspaceFolder . uri . fsPath , o . path ) ) ;
79+ UriFromWorkspace = Uri . file ( path . resolve ( workspaceFolder . uri . fsPath , o . path ) ) ;
8080 }
8181 }
82- if ( uri === undefined ) {
83- uri = Uri . file ( path . resolve ( w . uri . fsPath , o . path ) ) ;
84- }
82+ const uri = UriFromWorkspace ? UriFromWorkspace : Uri . file ( path . resolve ( w . uri . fsPath , o . path ) ) ;
83+
8584 // Check if the project already exists in the newProjects array
86- if ( ! newProjects . some ( ( p ) => p . uri . toString ( ) === uri . toString ( ) ) ) {
85+ if ( ! newProjects . some ( ( p ) => p . uri . toString ( ) === uri . toString ( ) ) ) {
8786 newProjects . push ( new PythonProjectsImpl ( o . path , uri ) ) ;
8887 }
8988 }
You can’t perform that action at this time.
0 commit comments