File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -157,22 +157,22 @@ export class Commands {
157157 const output : {
158158 workspaces : { folderUri : vscode . Uri ; remoteAuthority : string } [ ]
159159 } = await vscode . commands . executeCommand ( "_workbench.getRecentlyOpened" )
160- const opened = output . workspaces . filter ( ( opened ) => opened . folderUri ?. authority === uri . authority )
160+ const opened = output . workspaces . filter (
161+ // Filter out `/` since that's added below.
162+ ( opened ) => opened . folderUri ?. authority === uri . authority && uri . path !== "/" ,
163+ )
161164 // Always add `/` as an option to open. If we don't, it can become hard
162165 // to open multiple VS Code windows.
163166 opened . splice ( 0 , 0 , {
164167 folderUri : uri ,
165168 remoteAuthority : "coder" ,
166169 } )
167170 if ( opened . length > 1 ) {
168- const items : vscode . QuickPickItem [ ] = opened
169- // Filter out `/` since that's added above.
170- . filter ( ( folder ) => folder . folderUri . path !== "/" )
171- . map ( ( folder ) : vscode . QuickPickItem => {
172- return {
173- label : folder . folderUri . fsPath ,
174- }
175- } )
171+ const items : vscode . QuickPickItem [ ] = opened . map ( ( folder ) : vscode . QuickPickItem => {
172+ return {
173+ label : folder . folderUri . fsPath ,
174+ }
175+ } )
176176 const item = await vscode . window . showQuickPick ( items , {
177177 title : "Select a recently opened folder" ,
178178 } )
You can’t perform that action at this time.
0 commit comments