File tree Expand file tree Collapse file tree 1 file changed +4
-23
lines changed Expand file tree Collapse file tree 1 file changed +4
-23
lines changed Original file line number Diff line number Diff line change @@ -909,30 +909,11 @@ function onMessage(msg: p.Message) {
909
909
if ( initialConfiguration != null ) {
910
910
extensionConfiguration = initialConfiguration ;
911
911
if ( extensionConfiguration . path !== "" &&
912
- ! path . isAbsolute ( extensionConfiguration . path )
912
+ extensionConfiguration . path [ 0 ] === "~"
913
913
) {
914
- // What should happen if the path is relative?
915
- // There is an option to create an absolute path using the params from msg,
916
- // but maybe it isn't the best option.
917
-
918
- if ( extensionConfiguration . path [ 0 ] === "~" ) {
919
- extensionConfiguration . path = path . join ( os . homedir ( ) , extensionConfiguration . path . slice ( 1 ) )
920
- } else {
921
- let rootFromMgs = null
922
- // @ts -ignore
923
- if ( msg . params != null && msg . params . rootUri != null ) {
924
- // @ts -ignore
925
- rootFromMgs = fileURLToPath ( msg . params . rootUri ) ;
926
- }
927
- // @ts -ignore
928
- if ( rootFromMgs == null && msg . params != null && msg . params . rootPath != null ) {
929
- // @ts -ignore
930
- rootFromMgs = msg . params . rootPath ;
931
- }
932
- extensionConfiguration . path = rootFromMgs == null
933
- ? ""
934
- : path . join ( rootFromMgs , extensionConfiguration . path ) ;
935
- }
914
+ // What should happen if the path contains the home directory symbol?
915
+ // This situation is handled below, but maybe it isn't the best option.
916
+ extensionConfiguration . path = path . join ( os . homedir ( ) , extensionConfiguration . path . slice ( 1 ) )
936
917
}
937
918
}
938
919
You can’t perform that action at this time.
0 commit comments