chore(scanner): skip profile_pics subtree during scans
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
fix(scanner): resolve dirs via CLI/env/constants; write per-item JSON; skip trash
|
||||
fix(scanner): rebuild per-folder metadata to match File/Folder models
|
||||
chore(scanner): skip profile_pics subtree during scans
|
||||
|
||||
- scan_uploads.php now falls back to UPLOAD_DIR/META_DIR from config.php
|
||||
- prevents double slashes in metadata paths; respects app timezone
|
||||
@@ -14,6 +15,8 @@ fix(scanner): rebuild per-folder metadata to match File/Folder models
|
||||
- Skips uploads/trash and symlinks
|
||||
- Resolves paths from CLI flags, env vars, or config constants (UPLOAD_DIR/META_DIR)
|
||||
- Idempotent; safe to run at startup via SCAN_ON_START
|
||||
- Avoids indexing internal avatar images (folder already hidden in UI)
|
||||
- Reduces scan noise and metadata churn; keeps firmware/other content indexed
|
||||
|
||||
## Changes 10/4/2025 v1.3.12
|
||||
|
||||
|
||||
@@ -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 app’s folder-name regex to stay consistent
|
||||
if (preg_match(REGEX_FOLDER_NAME, basename($rel))) {
|
||||
$folders[] = $rel;
|
||||
|
||||
Reference in New Issue
Block a user