提交 0310dc90 编写于 作者: I isidor

explorer model: compare authority in a case insensitive way

上级 6607a81c
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册