fix: prune orphaned folder rows alongside photo rows
prune_missing_photos() previously only deleted Photo rows whose files were gone, leaving every folder row from the old library in the DB — which made the sidebar tree wildly out of sync with the on-disk structure (still showing /photos/2024/, /photos/2026/03/, etc. that no longer exist). Now also drops Folder rows whose path doesn't resolve under a mounted source root, with the same defensive "skip if source root unmounted" guard. The Settings orphan card surfaces both counts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -233,6 +233,8 @@ export interface RegenerateResult {
|
||||
export interface MissingStats {
|
||||
would_delete?: number
|
||||
deleted?: number
|
||||
would_delete_folders?: number
|
||||
deleted_folders?: number
|
||||
skipped_unmounted: number
|
||||
dry_run: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user