mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Fix vault overview
This commit is contained in:
parent
0f42669043
commit
d57d5e983d
2 changed files with 6 additions and 3 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue