Skip to content

Commit 0f1540e

Browse files
committed
Revert "make UriIterator accept ignorePathCasing arg, microsoft#93368"
This reverts commit e87183e.
1 parent d57a038 commit 0f1540e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/vs/base/common/map.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import { URI } from 'vs/base/common/uri';
77
import { CharCode } from 'vs/base/common/charCode';
88
import { 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);

0 commit comments

Comments
 (0)