Fix error in open file scenario. (#3986)
* Fix error in open file scenario.
This commit is contained in:
@@ -178,7 +178,7 @@ export class CppProperties {
|
||||
// defaultPaths is only used when there isn't a c_cpp_properties.json, but we don't send the configuration changed event
|
||||
// to the language server until the default include paths and frameworks have been sent.
|
||||
let configFilePath: string = path.join(this.configFolder, "c_cpp_properties.json");
|
||||
if (fs.existsSync(configFilePath)) {
|
||||
if (this.rootUri !== null && fs.existsSync(configFilePath)) {
|
||||
this.propertiesFile = vscode.Uri.file(configFilePath);
|
||||
} else {
|
||||
this.propertiesFile = null;
|
||||
|
||||
Reference in New Issue
Block a user