From ed0421bcd592b0d0e79d4c8e563aee64ae2cc142 Mon Sep 17 00:00:00 2001 From: Lost Paul <70213368+LostPaul@users.noreply.github.com> Date: Sun, 11 Jun 2023 14:54:58 +0200 Subject: [PATCH] File name cannot end with a dot error --- manifest.json | 2 +- src/commands.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 046988a..ea92efa 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "folder-notes", "name": "Folder notes", - "version": "1.3.0", + "version": "1.3.1", "minAppVersion": "0.15.0", "description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.", "author": "Lost Paul", diff --git a/src/commands.ts b/src/commands.ts index c0ad3dd..3ca00bd 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -26,6 +26,10 @@ export class Commands { return; } } + if (text.endsWith('.')) { + new Notice('File name cannot end with a dot'); + return; + } let folder: TAbstractFile | null; const folderPath = this.plugin.getFolderPathFromString(file.path); if (folderPath === '') {