diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index af9328244731b877cf46b7fde6f61e668487bf38..4d750acc6f8eb1eff9cbfd12727961834288fee8 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -290,12 +290,16 @@ export class FileChangesEvent extends events.Event { } } -export function isEqual(path1: string, path2: string) { +export function isEqual(path1: string, path2: string): boolean { const identityEquals = (path1 === path2); if (isLinux || identityEquals) { return identityEquals; } + if (path1.length !== path2.length) { + return false; + } + return path1.toLowerCase() === path2.toLowerCase(); } diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 084fdd8ec599f6ddfc363f77415129d49701d82b..fcdf3bfb8f2deda697685ffe9ae1af79986f43b1 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -396,6 +396,10 @@ export class ExplorerView extends CollapsibleViewletView { } private onFileOperation(e: FileOperationEvent): void { + if (!this.root) { + return; // ignore if not yet created + } + let modelElement: FileStat; let parent: FileStat; let parentResource: URI;