Skip to content

Commit aa424f1

Browse files
authored
Fix bug c_cpp_properties.json creation after being deleted. (#2235)
Fix bug c_cpp_properties.json creation after being deleted: #2214
1 parent 130711f commit aa424f1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,8 @@ export class CppProperties {
495495
} else {
496496
fs.mkdir(this.configFolder, (e: NodeJS.ErrnoException) => {
497497
if (!e || e.code === 'EEXIST') {
498-
let dirPathEscaped: string = this.configFolder.replace("#", "%23");
499-
let fullPathToFile: string = path.join(dirPathEscaped, "c_cpp_properties.json");
500-
let filePath: vscode.Uri = vscode.Uri.parse("untitled:" + fullPathToFile);
498+
let fullPathToFile: string = path.join(this.configFolder, "c_cpp_properties.json");
499+
let filePath: vscode.Uri = vscode.Uri.file(fullPathToFile).with({ scheme: "untitled" });
501500
vscode.workspace.openTextDocument(filePath).then((document: vscode.TextDocument) => {
502501
let edit: vscode.WorkspaceEdit = new vscode.WorkspaceEdit();
503502
if (this.configurationJson) {

0 commit comments

Comments
 (0)