File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import { URI } from 'vs/base/common/uri' ;
77import { CharCode } from 'vs/base/common/charCode' ;
88import { compareSubstringIgnoreCase , compare , compareSubstring } from 'vs/base/common/strings' ;
9+ import { Schemas } from 'vs/base/common/network' ;
10+ import { isLinux } from 'vs/base/common/platform' ;
911
1012/**
1113 * @deprecated ES6: use `[...SetOrMap.values()]`
@@ -159,8 +161,6 @@ export class UriIterator implements IKeyIterator<URI> {
159161 private _states : UriIteratorState [ ] = [ ] ;
160162 private _stateIdx : number = 0 ;
161163
162- constructor ( private readonly _ignorePathCasing : boolean = false ) { }
163-
164164 reset ( key : URI ) : this {
165165 this . _value = key ;
166166 this . _states = [ ] ;
@@ -171,7 +171,10 @@ export class UriIterator implements IKeyIterator<URI> {
171171 this . _states . push ( UriIteratorState . Authority ) ;
172172 }
173173 if ( this . _value . path ) {
174- this . _pathIterator = new PathIterator ( false , ! this . _ignorePathCasing ) ;
174+ //todo@jrieken the case-sensitive logic is copied form `resources.ts#hasToIgnoreCase`
175+ // which cannot be used because it depends on this
176+ const caseSensitive = key . scheme === Schemas . file && isLinux ;
177+ this . _pathIterator = new PathIterator ( false , caseSensitive ) ;
175178 this . _pathIterator . reset ( key . path ) ;
176179 if ( this . _pathIterator . value ( ) ) {
177180 this . _states . push ( UriIteratorState . Path ) ;
You can’t perform that action at this time.
0 commit comments