Skip to content

Commit

Permalink
Get stats on folder onfly if scheme is file Fixes #48570
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Apr 26, 2018
1 parent f36cae3 commit 1b31feb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/workbench/parts/stats/node/workspaceStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1b31feb

Please sign in to comment.