diff --git a/manifest.json b/manifest.json index 0751f12..c784bf4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "folder-notes", "name": "Folder notes", - "version": "1.5.5", + "version": "1.5.6", "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/folderOverview/FolderOverview.ts b/src/folderOverview/FolderOverview.ts index ae5749a..b2d59f0 100644 --- a/src/folderOverview/FolderOverview.ts +++ b/src/folderOverview/FolderOverview.ts @@ -68,7 +68,7 @@ export class FolderOverview { let files: TAbstractFile[] = []; const sourceFile = plugin.app.vault.getAbstractFileByPath(ctx.sourcePath); if (!sourceFile) return; - const sourceFolderPath = this.yaml.folderPath || plugin.getFolderPathFromString(ctx.sourcePath); + let sourceFolderPath = this.yaml.folderPath || plugin.getFolderPathFromString(ctx.sourcePath); let sourceFolder: TFolder | undefined; if (sourceFolderPath !== '/') { if (this.yaml.folderPath === '') { @@ -86,7 +86,10 @@ export class FolderOverview { titleEl.innerText = this.yaml.title.replace('{{folderName}}', ''); } } - if (!sourceFolder && sourceFolderPath !== '/') { return new Notice('Couldn\'t find the folder'); } + if (!sourceFolder && (sourceFolderPath !== '/' && sourceFolderPath !== '')) { return new Notice('Couldn\'t find the folder'); } + if (!sourceFolder && sourceFolderPath == '') { + sourceFolderPath = '/'; + } if (sourceFolderPath == '/') { const rootFiles: TAbstractFile[] = []; plugin.app.vault.getAllLoadedFiles().filter(f => f.parent?.path === '/').forEach((file) => {