chore(scanner): skip profile_pics subtree during scans

This commit is contained in:
Ryan
2025-10-04 03:35:39 -04:00
committed by GitHub
parent 494be05801
commit e3e3aaa475
2 changed files with 6 additions and 2 deletions

View File

@@ -58,8 +58,9 @@ function list_all_folders(string $root): array {
// relative key like "foo/bar"
$rel = ltrim(str_replace(['\\'], '/', substr($path, strlen($root) + 1)), '/');
if ($rel === '') continue;
// skip trash subtree
if (strpos($rel, 'trash/') === 0 || $rel === 'trash') continue;
// skip trash and profile_pics subtrees
if ($rel === 'trash' || strpos($rel, 'trash/') === 0) continue;
if ($rel === 'profile_pics' || strpos($rel, 'profile_pics/') === 0) continue;
// obey the apps folder-name regex to stay consistent
if (preg_match(REGEX_FOLDER_NAME, basename($rel))) {
$folders[] = $rel;