Fix note breadcrumb showing 'Unfiled Notes' on Windows: normalize backslash paths before deriving the note's folder (#99)

This commit is contained in:
Yuri Karamian
2026-06-12 09:11:26 +02:00
parent 5f311f2404
commit 1b7dc77792
+2 -1
View File
@@ -376,7 +376,8 @@
viewerImportBusy = false;
}
}
let noteRelativePath = $derived($activeNotePath && $appConfig?.active_vault ? $activeNotePath.replace($appConfig.active_vault + '/', '') : '');
// Normalize Windows backslashes to '/' so the prefix strip and folder split work cross-platform (issue #99).
let noteRelativePath = $derived($activeNotePath && $appConfig?.active_vault ? $activeNotePath.replace(/\\/g, '/').replace($appConfig.active_vault.replace(/\\/g, '/') + '/', '') : '');
let noteFolder = $derived(noteRelativePath ? noteRelativePath.substring(0, noteRelativePath.lastIndexOf('/')) : '');
let isQuickAccess = $derived(noteRelativePath ? $quickAccessPaths.includes(noteRelativePath) : false);