diff --git a/src/functions/folderNoteFunctions.ts b/src/functions/folderNoteFunctions.ts index 97594ae..b298e7d 100644 --- a/src/functions/folderNoteFunctions.ts +++ b/src/functions/folderNoteFunctions.ts @@ -280,11 +280,10 @@ export function getFolderNote(plugin: FolderNotesPlugin, folderPath: string, sto folder.path = getFolderPathFromString(folderPath); } + let path = `${folder.path}/${fileName}`; - if (folder.path.trim() === '') { - folder.path = fileName; - path = `${fileName}`; - } + folder.path == '/' ? path = fileName : path = `${folder.path}/${fileName}`; + let folderNoteType = plugin.settings.folderNoteType; if (folderNoteType === '.excalidraw') {