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> {
803
803
continue ;
804
804
}
805
805
}
806
- for await ( const workspaceFolder of vscode . workspace . workspaceFolders ) {
806
+ for await ( const workspaceFolder of vscode . workspace . workspaceFolders ?? [ ] ) {
807
807
await addWsServerRootFolderData ( workspaceFolder . uri ) ;
808
808
}
809
809
@@ -1344,7 +1344,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
1344
1344
}
1345
1345
// Check connections sequentially for each workspace folder
1346
1346
let refreshFilesExplorer = false ;
1347
- for await ( const folder of vscode . workspace . workspaceFolders ) {
1347
+ for await ( const folder of vscode . workspace . workspaceFolders ?? [ ] ) {
1348
1348
if ( schemas . includes ( folder . uri . scheme ) ) {
1349
1349
refreshFilesExplorer = true ;
1350
1350
}
Original file line number Diff line number Diff line change @@ -633,12 +633,15 @@ export async function addWsServerRootFolderData(uri: vscode.Uri): Promise<void>
633
633
const value : WSServerRootFolderData = {
634
634
redirectDotvscode : true ,
635
635
} ;
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
638
638
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 ( ( ) => { } ) ;
642
645
}
643
646
wsServerRootFolders . set ( uri . toString ( ) , value ) ;
644
647
}
You can’t perform that action at this time.
0 commit comments