@@ -48,8 +48,8 @@ export const count: (glob: string | string[]) => number = (glob: string | string
48
48
for ( const g of ( Array . isArray ( glob ) ? glob . filter ( unique ) : [ glob ] ) )
49
49
if ( g . startsWith ( "https://" ) )
50
50
i ++ ;
51
- else // need to normalize '/' ↓ so glob works properly
52
- globs . push ( resolveEnv ( g ) . replace ( / \\ / g , '/' ) ) ;
51
+ else // do not normalize '/', add file/dir already does this; warning already included in add glob
52
+ globs . push ( resolveEnv ( g ) ) ;
53
53
54
54
return i + ( globSync ( globs , options ) as string [ ] ) . filter ( filter ) . filter ( unique ) . length ;
55
55
}
@@ -61,11 +61,11 @@ export const resolve: (glob: string | string[]) => string[] = (glob: string | st
61
61
for ( const g of ( Array . isArray ( glob ) ? glob . filter ( unique ) : [ glob ] ) )
62
62
if ( g . startsWith ( "https://" ) )
63
63
urls . push ( g ) ;
64
- else // need to normalize '/' ↓ so glob works properly
65
- globs . push ( resolveEnv ( g ) . replace ( / \\ / g , '/' ) ) ;
64
+ else // do not normalize '/', add file/dir already does this; warning already included in add glob
65
+ globs . push ( resolveEnv ( g ) ) ;
66
66
67
67
return urls . concat ( ( globSync ( globs , options ) as string [ ] )
68
- . filter ( filter ) // need to normalize '/' again ↓ because glob uses the wrong slash
68
+ . filter ( filter ) // must use '/' for URL ↓
69
69
. map ( path => `vscode-file://vscode-app/${ path . replace ( / \\ / g, '/' ) . replace ( / ^ \/ + / g, "" ) } ` ) )
70
70
. filter ( unique )
71
71
. map ( path => '"' + path + '"' ) ;
0 commit comments