66import { URI } from 'vs/base/common/uri' ;
77import { CharCode } from 'vs/base/common/charCode' ;
88import { compareSubstringIgnoreCase , compare , compareSubstring , compareIgnoreCase } from 'vs/base/common/strings' ;
9+ import { isLinux } from 'vs/base/common/platform' ;
10+ import { Schemas } from 'vs/base/common/network' ;
911
1012export function getOrSet < K , V > ( map : Map < K , V > , key : K , value : V ) : V {
1113 let result = map . get ( key ) ;
@@ -138,7 +140,7 @@ export class UriIterator implements IKeyIterator<URI> {
138140 private _states : UriIteratorState [ ] = [ ] ;
139141 private _stateIdx : number = 0 ;
140142
141- constructor ( private readonly _ignorePathCasing : boolean ) { }
143+ constructor ( private readonly _ignorePathCasing : boolean | undefined ) { }
142144
143145 reset ( key : URI ) : this {
144146 this . _value = key ;
@@ -150,7 +152,10 @@ export class UriIterator implements IKeyIterator<URI> {
150152 this . _states . push ( UriIteratorState . Authority ) ;
151153 }
152154 if ( this . _value . path ) {
153- this . _pathIterator = new PathIterator ( false , ! this . _ignorePathCasing ) ;
155+ this . _pathIterator = new PathIterator ( false , this . _ignorePathCasing === undefined
156+ ? key . scheme === Schemas . file && isLinux
157+ : ! this . _ignorePathCasing
158+ ) ;
154159 this . _pathIterator . reset ( key . path ) ;
155160 if ( this . _pathIterator . value ( ) ) {
156161 this . _states . push ( UriIteratorState . Path ) ;
@@ -226,7 +231,7 @@ class TernarySearchTreeNode<K, V> {
226231
227232export class TernarySearchTree < K , V > {
228233
229- static forUris < E > ( ignorePathCasing : boolean = false ) : TernarySearchTree < URI , E > {
234+ static forUris < E > ( ignorePathCasing ? : boolean ) : TernarySearchTree < URI , E > {
230235 return new TernarySearchTree < URI , E > ( new UriIterator ( ignorePathCasing ) ) ;
231236 }
232237
0 commit comments