@@ -80,11 +80,9 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
8080 . actionQuery ( sql , [ spec , dir , orderBy , system , flat , notStudio , generated ] )
8181 . then ( ( data ) => data . result . content || [ ] )
8282 . then ( ( data ) => {
83- // If webapp '/' exists it will always list first
84- const rootWebAppExists = csp && data [ 0 ] ?. Name === "/" ;
8583 const results = data
8684 . filter ( ( item : StudioOpenDialog ) =>
87- item . Type === "10" ? csp && item . Name !== "/" : item . Type === "9" ? ! csp : ! rootWebAppExists
85+ item . Type === "10" ? csp && item . Name !== "/" : item . Type === "9" ? ! csp : csp ? item . Type === "5" : true
8886 )
8987 . map ( ( item : StudioOpenDialog ) => {
9088 // Handle how query returns web apps
@@ -133,20 +131,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
133131 } ) ;
134132 return results . concat ( cspSubdirs ) ;
135133 } ) ;
136- } else if ( rootWebAppExists ) {
137- // Expanding the root of a CSP-type workspace folder, and earlier we found a '/' root-level webapp
138- // so we now enumerate its files.
139- return api
140- . actionQuery ( sql , [ "/*" , dir , orderBy , "0" , "0" , notStudio , "0" ] )
141- . then ( ( data ) => data . result . content || [ ] )
142- . then ( ( data ) => {
143- const rootAppFiles : [ string , vscode . FileType ] [ ] = data
144- . filter ( ( item ) => item . Type === "5" )
145- . map ( ( item ) => {
146- return [ item . Name , vscode . FileType . File ] ;
147- } ) ;
148- return results . concat ( rootAppFiles ) ;
149- } ) ;
150134 } else {
151135 // Nothing else to add.
152136 return results ;
0 commit comments