5
5
6
6
import { IWorkbenchContribution } from 'vs/workbench/common/contributions' ;
7
7
import { localize } from 'vs/nls' ;
8
- import { dirname , basename , joinPath } from 'vs/base/common/resources' ;
8
+ import { dirname , basename } from 'vs/base/common/resources' ;
9
9
import { ITextModelService } from 'vs/editor/common/services/resolverService' ;
10
10
import { IDialogService } from 'vs/platform/dialogs/common/dialogs' ;
11
11
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-sandbox/environmentService' ;
@@ -73,10 +73,10 @@ export class StartupProfiler implements IWorkbenchContribution {
73
73
74
74
markerFile . then ( ( ) => {
75
75
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 ) ;
77
77
} ) ;
78
78
} ) . 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' ) ;
80
80
81
81
return this . _dialogService . confirm ( {
82
82
type : 'info' ,
@@ -87,8 +87,8 @@ export class StartupProfiler implements IWorkbenchContribution {
87
87
} ) . then ( res => {
88
88
if ( res . confirmed ) {
89
89
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 ) ) )
92
92
] ) . then ( ( ) => {
93
93
// keep window stable until restart is selected
94
94
return this . _dialogService . confirm ( {
0 commit comments