From 6e54db9f1c52ad55b1360b9c90cb017d393f1a49 Mon Sep 17 00:00:00 2001 From: SebastianMC Date: Fri, 30 Sep 2022 15:49:07 +0200 Subject: [PATCH] Introduced `normalizePath(...)` for consuming a path to note from plugin settings --- src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index c740715..020150f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,6 +3,7 @@ import { FileExplorerView, MetadataCache, Notice, + normalizePath, Plugin, PluginSettingTab, setIcon, @@ -332,7 +333,7 @@ class CustomSortSettingTab extends PluginSettingTab { .setPlaceholder('e.g. note.md') .setValue(this.plugin.settings.additionalSortspecFile) .onChange(async (value) => { - this.plugin.settings.additionalSortspecFile = value; + this.plugin.settings.additionalSortspecFile = normalizePath(value); await this.plugin.saveSettings(); }));