mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
Fix Windows wiki-link/graph showing duplicate and old-version notes (path separators)
This commit is contained in:
@@ -76,8 +76,10 @@
|
||||
}
|
||||
|
||||
function getFolderKey(path: string): string {
|
||||
const vaultRoot = $appConfig?.active_vault || '';
|
||||
const rel = vaultRoot && path.startsWith(vaultRoot + '/') ? path.slice(vaultRoot.length + 1) : path;
|
||||
// Normalize Windows backslashes so folder grouping/colours work there too.
|
||||
const p = (path || '').replace(/\\/g, '/');
|
||||
const vaultRoot = ($appConfig?.active_vault || '').replace(/\\/g, '/');
|
||||
const rel = vaultRoot && p.startsWith(vaultRoot + '/') ? p.slice(vaultRoot.length + 1) : p;
|
||||
const slash = rel.indexOf('/');
|
||||
return slash >= 0 ? rel.slice(0, slash) : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user