66import { Event } from 'vs/base/common/event' ;
77import { IChannel , IServerChannel } from 'vs/base/parts/ipc/node/ipc' ;
88import { IWindowsService , INativeOpenDialogOptions , IEnterWorkspaceResult , CrashReporterStartOptions , IMessageBoxResult , MessageBoxOptions , SaveDialogOptions , OpenDialogOptions , IDevToolsOptions , INewWindowOptions } from 'vs/platform/windows/common/windows' ;
9- import { IWorkspaceIdentifier , ISingleFolderWorkspaceIdentifier , isWorkspaceIdentifier , reviveWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces' ;
9+ import { IWorkspaceIdentifier , ISingleFolderWorkspaceIdentifier , reviveWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces' ;
1010import { IRecentlyOpened } from 'vs/platform/history/common/history' ;
1111import { ISerializableCommandAction } from 'vs/platform/actions/common/actions' ;
1212import { URI } from 'vs/base/common/uri' ;
@@ -63,7 +63,7 @@ export class WindowsChannel implements IServerChannel {
6363 case 'removeFromRecentlyOpened' : {
6464 let paths : Array < IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | URI | string > = arg ;
6565 if ( Array . isArray ( paths ) ) {
66- paths = paths . map ( path => isWorkspaceIdentifier ( path ) ? reviveWorkspaceIdentifier ( path ) : typeof path === 'string' ? path : URI . revive ( path ) ) ;
66+ paths = paths . map ( path => isChanneledWorkspaceIdentifier ( path ) ? reviveWorkspaceIdentifier ( path ) : typeof path === 'string' ? path : URI . revive ( path ) ) ;
6767 }
6868 return this . service . removeFromRecentlyOpened ( paths ) ;
6969 }
@@ -193,7 +193,7 @@ export class WindowsChannelClient implements IWindowsService {
193193 getRecentlyOpened ( windowId : number ) : Promise < IRecentlyOpened > {
194194 return this . channel . call ( 'getRecentlyOpened' , windowId )
195195 . then ( ( recentlyOpened : IRecentlyOpened ) => {
196- recentlyOpened . workspaces = recentlyOpened . workspaces . map ( workspace => isWorkspaceIdentifier ( workspace ) ? reviveWorkspaceIdentifier ( workspace ) : URI . revive ( workspace ) ) ;
196+ recentlyOpened . workspaces = recentlyOpened . workspaces . map ( workspace => isChanneledWorkspaceIdentifier ( workspace ) ? reviveWorkspaceIdentifier ( workspace ) : URI . revive ( workspace ) ) ;
197197 recentlyOpened . files = recentlyOpened . files . map ( URI . revive ) ;
198198 return recentlyOpened ;
199199 } ) ;
@@ -337,3 +337,7 @@ export class WindowsChannelClient implements IWindowsService {
337337 return Promise . resolve ( this . channel . call ( 'resolveProxy' , [ windowId , url ] ) ) ;
338338 }
339339}
340+
341+ function isChanneledWorkspaceIdentifier ( obj : any ) : obj is IWorkspaceIdentifier {
342+ return obj && obj [ 'configPath' ] ;
343+ }
0 commit comments