fix(library): split a stored path on the separator it was written with
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user