Skip to content

Commit 0c7f6b4

Browse files
authored
--prof-startup paths are slightly off (fix microsoft#158646) (microsoft#159410)
1 parent b5a1bb3 commit 0c7f6b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/vs/workbench/contrib/performance/electron-sandbox/startupProfiler.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
77
import { localize } from 'vs/nls';
8-
import { dirname, basename, joinPath } from 'vs/base/common/resources';
8+
import { dirname, basename } from 'vs/base/common/resources';
99
import { ITextModelService } from 'vs/editor/common/services/resolverService';
1010
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
1111
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-sandbox/environmentService';
@@ -73,10 +73,10 @@ export class StartupProfiler implements IWorkbenchContribution {
7373

7474
markerFile.then(() => {
7575
return this._fileService.resolve(dir).then(stat => {
76-
return (stat.children ? stat.children.filter(value => value.resource.path.includes(prefix)) : []).map(stat => stat.resource.path);
76+
return (stat.children ? stat.children.filter(value => value.resource.path.includes(prefix)) : []).map(stat => stat.resource);
7777
});
7878
}).then(files => {
79-
const profileFiles = files.reduce((prev, cur) => `${prev}${this._labelService.getUriLabel(joinPath(dir, cur))}\n`, '\n');
79+
const profileFiles = files.reduce((prev, cur) => `${prev}${this._labelService.getUriLabel(cur)}\n`, '\n');
8080

8181
return this._dialogService.confirm({
8282
type: 'info',
@@ -87,8 +87,8 @@ export class StartupProfiler implements IWorkbenchContribution {
8787
}).then(res => {
8888
if (res.confirmed) {
8989
Promise.all<any>([
90-
this._nativeHostService.showItemInFolder(URI.joinPath(dir, files[0]).fsPath),
91-
this._createPerfIssue(files)
90+
this._nativeHostService.showItemInFolder(files[0].fsPath),
91+
this._createPerfIssue(files.map(file => basename(file)))
9292
]).then(() => {
9393
// keep window stable until restart is selected
9494
return this._dialogService.confirm({

0 commit comments

Comments
 (0)