Skip to content

fix: keep legacy restore staging scans off GTK - #549

Merged
Linuxuser67 merged 7 commits into
mainfrom
fix/main-review-findings
Oct 26, 2026
Merged

Linuxuser67 merged 7 commits into
mainfrom
fix/main-review-findings

Conversation

@Linuxuser67

@Linuxuser67 Linuxuser67 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Keep potentially blocking destination-directory scans off GTK when restoring legacy queue entries or handling duplicate/missing persisted IDs.

  • Precompute only the destination listings needed for fallback ID allocation, on Tokio's blocking pool.
  • Pass the same snapshot to normal, gallery, and completed-history restore paths so restore does not re-read directories on GTK.
  • Preserve synchronous restore wrappers for tests only.
  • Propagate directory listing failures with the destination path and fail the restore without overwriting the last known-good queue; treat missing destinations as empty.
  • Remove the obsolete synchronous staging-occupancy helper and use the prelisted occupancy check consistently.

Tests

  • Verify only legacy or duplicate IDs require a directory listing.
  • Verify fallback ID allocation skips prelisted staging names.
  • Verify unreadable/non-directory destinations return an error.
  • Keep the existing staging occupancy tests on the prelisted helper.

Review / verification

Reviewed the full PR diff for correctness, clarity, architecture, security, performance, and Rust best practices. This branch includes the latest main, including PR #550. GitHub CI is being run for the current head; local Cargo build/test results are not claimed.

@Linuxuser67
Linuxuser67 force-pushed the fix/main-review-findings branch from 86bb833 to 77c7ec2 Compare October 26, 2026 15:01
@Linuxuser67
Linuxuser67 merged commit 4f7992d into main Oct 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant