File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
packages/vscode/tests/suite Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11import assert from 'node:assert' ;
2+ import path from 'node:path' ;
23import type * as vscode from 'vscode' ;
34
45export async function delay ( ms : number ) {
@@ -84,11 +85,9 @@ export function toLabelTree(
8485 const nodes : { label : string ; children ?: any [ ] } [ ] = [ ] ;
8586 collection . forEach ( ( child ) => {
8687 const children = toLabelTree ( child . children , maxDepth - 1 ) ;
87- nodes . push (
88- children . length
89- ? { label : child . label , children }
90- : { label : child . label } ,
91- ) ;
88+ // normalize to linux path style
89+ const label = child . label . replaceAll ( path . sep , '/' ) ;
90+ nodes . push ( children . length ? { label, children } : { label } ) ;
9291 } ) ;
9392 nodes . sort ( ( a , b ) => ( a . label < b . label ? - 1 : a . label > b . label ? 1 : 0 ) ) ;
9493 return nodes ;
You can’t perform that action at this time.
0 commit comments