提交 fa8c6e6b 编写于 作者: G gjsjohnmurray

Improve #79047 fix after feedback

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