diff --git a/docker/frontend/src/Library.tsx b/docker/frontend/src/Library.tsx index dcf9687..5607537 100644 --- a/docker/frontend/src/Library.tsx +++ b/docker/frontend/src/Library.tsx @@ -1586,7 +1586,6 @@ function Catalogue({ admin, user }: { admin: boolean; user: User | null }) { const normRoot = normPath(rootName); const normKey = normPath(key); if (normKey === normRoot) return ''; - if (normRoot === '') return `${normKey}/`; if (normKey.startsWith(`${normRoot}/`)) return `${normKey.slice(normRoot.length + 1)}/`; return null; }, @@ -1766,7 +1765,7 @@ function Catalogue({ admin, user }: { admin: boolean; user: User | null }) { // indented rows have to come in. for (const dir of [...(foldersUnder.get(lowerF) ?? [])].sort((a, b) => a.localeCompare(b))) { const parts = dir.split('/'); - const key = normF ? `${normF}/${dir}` : dir; + const key = `${normF}/${dir}`; out.push({ key, label: parts[parts.length - 1], diff --git a/docker/frontend/src/engine/library.ts b/docker/frontend/src/engine/library.ts index 1808b2a..dd9da83 100644 --- a/docker/frontend/src/engine/library.ts +++ b/docker/frontend/src/engine/library.ts @@ -1390,7 +1390,11 @@ export async function scanFolder( // been read once before is a reading of a hundred thousand frames even while // the walk is still up in its first folders, and one kept to a subfolder is // measured against the frames under that one alone. - const heldPrefix = `${folder.name}/${from}`.toLowerCase(); + // An id is `normPath(folder.name)/…`, and a drive root is named `\`, which + // `normPath` spells `''` — so the frames of such a roll's subfolder are filed + // under `/Roll/…`, and a prefix built as `${folder.name}/${from}` spells + // `\/Roll` and counts nought of them held. + const heldPrefix = `${normPath(folder.name)}/${normPath(from)}`.toLowerCase(); const held = bounded ? rawKnown.filter((p) => p.id.toLowerCase().startsWith(heldPrefix)).length : rawKnown.length;