@@ -62,8 +62,8 @@ export interface IHostUtils {
62
62
readonly _serviceBrand : undefined ;
63
63
readonly pid : number | undefined ;
64
64
exit ( code : number ) : void ;
65
- exists ( path : string ) : Promise < boolean > ;
66
- realpath ( path : string ) : Promise < string > ;
65
+ fsExists ? ( path : string ) : Promise < boolean > ;
66
+ fsRealpath ? ( path : string ) : Promise < string > ;
67
67
}
68
68
69
69
type TelemetryActivationEventFragment = {
@@ -325,11 +325,11 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
325
325
* Applies realpath to file-uris and returns all others uris unmodified
326
326
*/
327
327
private async _realPathExtensionUri ( uri : URI ) : Promise < URI > {
328
- if ( uri . scheme !== Schemas . file ) {
329
- return uri ;
328
+ if ( uri . scheme === Schemas . file && this . _hostUtils . fsRealpath ) {
329
+ const realpathValue = await this . _hostUtils . fsRealpath ( uri . fsPath ) ;
330
+ return URI . file ( realpathValue ) ;
330
331
}
331
- const realpathValue = await this . _hostUtils . realpath ( uri . fsPath ) ;
332
- return URI . file ( realpathValue ) ;
332
+ return uri ;
333
333
}
334
334
335
335
// create trie to enable fast 'filename -> extension id' look up
@@ -683,8 +683,8 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
683
683
const host : IExtensionActivationHost = {
684
684
logService : this . _logService ,
685
685
folders : folders . map ( folder => folder . uri ) ,
686
- forceUsingSearch : localWithRemote ,
687
- exists : ( uri ) => this . _hostUtils . exists ( uri . fsPath ) ,
686
+ forceUsingSearch : localWithRemote || ! this . _hostUtils . fsExists ,
687
+ exists : ( uri ) => this . _hostUtils . fsExists ! ( uri . fsPath ) ,
688
688
checkExists : ( folders , includes , token ) => this . _mainThreadWorkspaceProxy . $checkExists ( folders , includes , token )
689
689
} ;
690
690
0 commit comments