File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1721,14 +1721,18 @@ export class CppProperties {
17211721
17221722 for ( const p of paths ) {
17231723 let pathExists : boolean = true ;
1724+ let quotedPath : boolean = false ;
17241725 let resolvedPath : string = this . resolvePath ( p ) ;
17251726 if ( ! resolvedPath ) {
17261727 continue ;
17271728 }
17281729
17291730 // Check if resolved path exists
17301731 if ( ! fs . existsSync ( resolvedPath ) ) {
1731- if ( assumeRelative && ! path . isAbsolute ( resolvedPath ) ) {
1732+ if ( resolvedPath . match ( / " .* " / ) !== null ) {
1733+ pathExists = false ;
1734+ quotedPath = true ;
1735+ } else if ( assumeRelative && ! path . isAbsolute ( resolvedPath ) ) {
17321736 continue ;
17331737 } else if ( ! this . rootUri ) {
17341738 pathExists = false ;
@@ -1744,7 +1748,10 @@ export class CppProperties {
17441748 }
17451749
17461750 if ( ! pathExists ) {
1747- const message : string = localize ( 'cannot.find' , "Cannot find: {0}" , resolvedPath ) ;
1751+ let message : string = localize ( 'cannot.find' , "Cannot find: {0}" , resolvedPath ) ;
1752+ if ( quotedPath ) {
1753+ message += '. ' + localize ( 'wrapped.with.quotes' , 'Do not add extra quotes around paths.' ) ;
1754+ }
17481755 errors . push ( message ) ;
17491756 continue ;
17501757 }
You can’t perform that action at this time.
0 commit comments