@@ -80,11 +80,9 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
80
80
. actionQuery ( sql , [ spec , dir , orderBy , system , flat , notStudio , generated ] )
81
81
. then ( ( data ) => data . result . content || [ ] )
82
82
. then ( ( data ) => {
83
- // If webapp '/' exists it will always list first
84
- const rootWebAppExists = csp && data [ 0 ] ?. Name === "/" ;
85
83
const results = data
86
84
. 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
88
86
)
89
87
. map ( ( item : StudioOpenDialog ) => {
90
88
// Handle how query returns web apps
@@ -133,20 +131,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
133
131
} ) ;
134
132
return results . concat ( cspSubdirs ) ;
135
133
} ) ;
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
- } ) ;
150
134
} else {
151
135
// Nothing else to add.
152
136
return results ;
0 commit comments