From a105dd6fcb22022848e2cc027731592820ee5b16 Mon Sep 17 00:00:00 2001 From: Lester Tay <39982625+lestertay@users.noreply.github.com> Date: Sat, 23 Mar 2024 19:10:16 +0800 Subject: [PATCH] Remove illegal characters for folder names too At the moment, we remove illegal characters for file names but not folder names. This diff adds it. --- src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index fe522b5..8fc666b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -253,8 +253,10 @@ export default class OmnivorePlugin extends Plugin { ) for (const item of items) { - const folderName = normalizePath( - render(item, folder, this.settings.folderDateFormat), + const folderName = replaceIllegalChars( + normalizePath( + render(item, folder, this.settings.folderDateFormat), + ) ) const omnivoreFolder = this.app.vault.getAbstractFileByPath(folderName)