Skip to content

Commit

Permalink
fix(posix new file): use uri.fsPath
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcMcIntosh authored and alashchev17 committed Oct 22, 2024
1 parent 3926e26 commit 525cb31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 525cb31

Please sign in to comment.