fix: realtime subfolder discovery, count updates, and deep level scan indicator
This commit is contained in:
@@ -798,12 +798,14 @@ export async function scanFolder(
|
||||
const relNorm = rel.replace(/\\/g, '/');
|
||||
const cut = relNorm.lastIndexOf('/');
|
||||
counts[normRoot] = (counts[normRoot] ?? 0) + n;
|
||||
counts[normRoot.toLowerCase()] = counts[normRoot];
|
||||
let path = '';
|
||||
for (const part of (cut < 0 ? '' : relNorm.slice(0, cut)).split('/')) {
|
||||
if (!part) continue;
|
||||
path = path ? `${path}/${part}` : part;
|
||||
const key = `${normRoot}/${path}`;
|
||||
counts[key] = (counts[key] ?? 0) + n;
|
||||
counts[key.toLowerCase()] = counts[key];
|
||||
}
|
||||
};
|
||||
for (const id of known.keys()) count(id.startsWith(`${normRoot}/`) ? id.slice(normRoot.length + 1) : id);
|
||||
|
||||
Reference in New Issue
Block a user