From 0310dc908ddf165b57ff1c4a18991aa6acc74fab Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 22 Aug 2018 10:54:44 +0200 Subject: [PATCH] explorer model: compare authority in a case insensitive way --- src/vs/workbench/parts/files/common/explorerModel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/files/common/explorerModel.ts b/src/vs/workbench/parts/files/common/explorerModel.ts index b299ed27968..6b66d23af4f 100644 --- a/src/vs/workbench/parts/files/common/explorerModel.ts +++ b/src/vs/workbench/parts/files/common/explorerModel.ts @@ -15,7 +15,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { toResource, IEditorIdentifier, IEditorInput } from 'vs/workbench/common/editor'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Schemas } from 'vs/base/common/network'; -import { rtrim, startsWithIgnoreCase, startsWith } from 'vs/base/common/strings'; +import { rtrim, startsWithIgnoreCase, startsWith, equalsIgnoreCase } from 'vs/base/common/strings'; import { IEditorGroup } from 'vs/workbench/services/group/common/editorGroupsService'; export class Model { @@ -343,7 +343,7 @@ export class ExplorerItem { public find(resource: URI): ExplorerItem { // Return if path found // For performance reasons try to do the comparison as fast as possible - if (resource && this.resource.scheme === resource.scheme && this.resource.authority === resource.authority && + if (resource && this.resource.scheme === resource.scheme && equalsIgnoreCase(this.resource.authority, resource.authority) && (resources.hasToIgnoreCase(resource) ? startsWithIgnoreCase(resource.path, this.resource.path) : startsWith(resource.path, this.resource.path))) { return this.findByPath(rtrim(resource.path, paths.sep), this.resource.path.length); } -- GitLab