From fa8c6e6b77a206f8d65bc53a83b100e253ae9658 Mon Sep 17 00:00:00 2001 From: gjsjohnmurray Date: Wed, 14 Aug 2019 10:42:59 +0100 Subject: [PATCH] Improve #79047 fix after feedback --- src/vs/workbench/contrib/files/common/explorerService.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/files/common/explorerService.ts b/src/vs/workbench/contrib/files/common/explorerService.ts index 81967032028..aff4390570c 100644 --- a/src/vs/workbench/contrib/files/common/explorerService.ts +++ b/src/vs/workbench/contrib/files/common/explorerService.ts @@ -158,12 +158,10 @@ export class ExplorerService implements IExplorerService { // Stat needs to be resolved first and then revealed const options: IResolveFileOptions = { resolveTo: [resource], resolveMetadata: this.sortOrder === 'modified' }; const workspaceFolder = this.contextService.getWorkspaceFolder(resource); - const rootUri = workspaceFolder ? workspaceFolder.uri : this.roots[0].resource; - - // Do not waste time looking in a different scheme - if (resource.scheme !== rootUri.scheme) { + if (workspaceFolder === null) { return Promise.resolve(undefined); } + const rootUri = workspaceFolder.uri; const root = this.roots.filter(r => r.resource.toString() === rootUri.toString()).pop()!; -- GitLab