File name cannot end with a dot error

This commit is contained in:
Lost Paul 2023-06-11 14:54:58 +02:00
parent 581b273407
commit ed0421bcd5
2 changed files with 5 additions and 1 deletions

View file

@ -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",

View file

@ -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 === '') {