提交 1b31feb5 编写于 作者: R Ramya Achutha Rao

Get stats on folder onfly if scheme is file Fixes #48570

上级 f36cae36
......@@ -255,8 +255,9 @@ export class WorkspaceStats implements IWorkbenchContribution {
tags['workspace.roots'] = isEmpty ? 0 : workspace.folders.length;
tags['workspace.empty'] = isEmpty;
const folders = !isEmpty ? workspace.folders.map(folder => folder.uri) : this.environmentService.appQuality !== 'stable' && this.findFolders(configuration);
let folders = !isEmpty ? workspace.folders.map(folder => folder.uri) : this.environmentService.appQuality !== 'stable' && this.findFolders(configuration);
if (folders && folders.length && this.fileService) {
folders = folders.filter(x => x.scheme === 'file');
//return
const files: IResolveFileResult[] = await this.fileService.resolveFiles(folders.map(resource => ({ resource })));
const names = (<IFileStat[]>[]).concat(...files.map(result => result.success ? (result.stat.children || []) : [])).map(c => c.name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册