File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -803,7 +803,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
803803 continue ;
804804 }
805805 }
806- for await ( const workspaceFolder of vscode . workspace . workspaceFolders ) {
806+ for await ( const workspaceFolder of vscode . workspace . workspaceFolders ?? [ ] ) {
807807 await addWsServerRootFolderData ( workspaceFolder . uri ) ;
808808 }
809809
@@ -1344,7 +1344,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
13441344 }
13451345 // Check connections sequentially for each workspace folder
13461346 let refreshFilesExplorer = false ;
1347- for await ( const folder of vscode . workspace . workspaceFolders ) {
1347+ for await ( const folder of vscode . workspace . workspaceFolders ?? [ ] ) {
13481348 if ( schemas . includes ( folder . uri . scheme ) ) {
13491349 refreshFilesExplorer = true ;
13501350 }
Original file line number Diff line number Diff line change @@ -633,12 +633,15 @@ export async function addWsServerRootFolderData(uri: vscode.Uri): Promise<void>
633633 const value : WSServerRootFolderData = {
634634 redirectDotvscode : true ,
635635 } ;
636- if ( isCSPFile ( uri ) ) {
637- // A CSP-type root folder that already has a .vscode/settings.json file must not redirect .vscode/* references
636+ if ( isCSPFile ( uri ) && ! [ "" , "/" ] . includes ( uri . path ) ) {
637+ // A CSP-type root folder for a specific webapp that already has a .vscode/settings.json file must not redirect .vscode/* references
638638 const api = new AtelierAPI ( uri ) ;
639- api . getDoc ( `${ uri . path } /.vscode/settings.json` ) . then ( ( ) => {
640- value . redirectDotvscode = false ;
641- } ) ;
639+ api
640+ . headDoc ( `${ uri . path } /.vscode/settings.json` )
641+ . then ( ( ) => {
642+ value . redirectDotvscode = false ;
643+ } )
644+ . catch ( ( ) => { } ) ;
642645 }
643646 wsServerRootFolders . set ( uri . toString ( ) , value ) ;
644647}
You can’t perform that action at this time.
0 commit comments