fix(library): mark only the folder a reading stands in, and keep a one-folder reading out of the roll's count
The column's ring was drawn from the open node's roll: a row of another roll had no path under it, so the empty prefix matched every row of the roll being read and the whole column lit up. The roll's own row was marked too, at every moment of a reading of it, and a reading kept to one folder counted its frames onto the roll's row as well — a roll counted down to one branch of itself. A queued request was drawn from the reading's roll instead of its own, so a request on a second roll showed nothing at all.
This commit is contained in:
@@ -793,7 +793,13 @@ export async function scanFolder(
|
||||
const relNorm = rel.replace(/\\/g, '/');
|
||||
const cut = relNorm.lastIndexOf('/');
|
||||
const normRoot = normPath(folder.name);
|
||||
counts[normRoot] = (counts[normRoot] ?? 0) + 1;
|
||||
// A reading kept to one folder says nothing about the roll it sits in: the
|
||||
// roll's own row counts every frame of the roll, and a number that counted
|
||||
// one branch of it would count the roll down to that branch. Its own frames
|
||||
// are outside the reading anyway — a bounded walk starts at `from`, so every
|
||||
// frame it reaches is under it, and the roll's row keeps the catalogue's
|
||||
// number until the reading is through and the catalogue is read back.
|
||||
if (!bounded) counts[normRoot] = (counts[normRoot] ?? 0) + 1;
|
||||
let path = '';
|
||||
for (const part of (cut < 0 ? '' : relNorm.slice(0, cut)).split('/')) {
|
||||
if (!part) continue;
|
||||
|
||||
Reference in New Issue
Block a user