fix(library): split a stored path on the separator it was written with

This commit is contained in:
2026-10-11 11:59:38 +07:00
parent 6527a9c12d
commit 3f778a859e
3 changed files with 14 additions and 5 deletions
+4 -1
View File
@@ -1017,7 +1017,10 @@ async function clearWalk(folder: string): Promise<void> {
async function framesAt(root: FileSystemDirectoryHandle, rels: string[]): Promise<WalkFile[]> {
const dirs = new Map<string, FileSystemDirectoryHandle>();
const out: WalkFile[] = [];
for (const rel of rels) {
for (const raw of rels) {
// A walk file written on Windows spells its frame `2017\2017-02-PHUNINH\_DSF1.RAF`;
// normalising once here means everything below sees the same `/` as the rest of the catalogue.
const rel = normPath(raw);
const cut = rel.lastIndexOf('/');
const at = cut < 0 ? '' : rel.slice(0, cut);
let dir = dirs.get(at);