File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1574,9 +1574,11 @@ export class CppProperties {
1574
1574
quoted = true ;
1575
1575
result = result . slice ( 1 , - 1 ) ;
1576
1576
}
1577
+ // On Windows, isAbsolute does not handle root paths without a slash, such as "C:"
1578
+ const isWindowsRootPath : boolean = process . platform === 'win32' && / ^ [ a - z A - Z ] : $ / . test ( result ) ;
1577
1579
// Make sure all paths result to an absolute path.
1578
1580
// Do not add the root path to an unresolved env variable.
1579
- if ( ! result . includes ( "env:" ) && ! path . isAbsolute ( result ) && this . rootUri ) {
1581
+ if ( ! isWindowsRootPath && ! result . includes ( "env:" ) && ! path . isAbsolute ( result ) && this . rootUri ) {
1580
1582
result = path . join ( this . rootUri . fsPath , result ) ;
1581
1583
}
1582
1584
if ( quoted ) {
You can’t perform that action at this time.
0 commit comments