From 525cb31453f1cab69bda3f2d5ab9b719dbd4e175 Mon Sep 17 00:00:00 2001 From: Marc McIntosh Date: Tue, 22 Oct 2024 13:09:54 +0200 Subject: [PATCH] fix(posix new file): use uri.fsPath --- src/sidebar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sidebar.ts b/src/sidebar.ts index ab9e2482..2f2be5fc 100644 --- a/src/sidebar.ts +++ b/src/sidebar.ts @@ -613,7 +613,7 @@ export class PanelWebview implements vscode.WebviewViewProvider { createNewFileWithContent(fileName: string, content: string) { const uri = this.filePathToUri(fileName); - const newFile = vscode.Uri.parse('untitled:' + uri); + const newFile = vscode.Uri.parse('untitled:' + uri.fsPath); vscode.workspace.openTextDocument(newFile).then(document => { const edit = new vscode.WorkspaceEdit(); edit.insert(newFile, new vscode.Position(0, 0), content);