Skip to content

Commit

Permalink
add default ".txt" extension if not already specified during "New Tex…
Browse files Browse the repository at this point in the history
…t File"
  • Loading branch information
JonasLukasczyk committed Oct 7, 2024
1 parent 75edbaa commit ca2e642
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/renderer/src/views/ArcTreeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ const createFile = async node=>{
icon: 'note_add'
}
}).onOk( async name => {
if(!name.includes('.'))
name += '.txt';
const path = node.id + '/' + name;
await window.ipc.invoke('LocalFileSystemService.writeFile', [path,'']);
});
Expand Down

0 comments on commit ca2e642

Please sign in to comment.