Reject derived outputs inside the source tree #523

Open
nufu88pa wants to merge 1 commit from upstream-pr/523 into a-publier
nufu88pa commented 2026-11-27 08:28:34 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by nufu88pa on 2026-11-27T08:28:34Z.


Fixes #510.

Changes

Apply the existing ensure_outside_repo check before frame recording, replay image export, replay shader retranslation, and untranslated-shader list output. Retranslation also checks the capture’s sibling containers directory before creating either output directory.

Verification

All three regression tests passed on Windows with Rust 1.98.1. The tests use temporary directories and require no game files or GPU.

  • cargo test --locked -p victory --features diagnostics --test derived_output_policy
  • cargo test --locked -p victory-gpu --features diagnostics --lib recorder_rejects_a_destination_inside_the_source_tree
  • git diff --check

Prepared with assistance from Codex.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:5523565391 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/523). Originally posted by [nufu88pa](https://github.com/nufu88pa) on 2026-11-27T08:28:34Z. --- Fixes #510. ## Changes Apply the existing `ensure_outside_repo` check before frame recording, replay image export, replay shader retranslation, and untranslated-shader list output. Retranslation also checks the capture’s sibling `containers` directory before creating either output directory. ## Verification All three regression tests passed on Windows with Rust 1.98.1. The tests use temporary directories and require no game files or GPU. - `cargo test --locked -p victory --features diagnostics --test derived_output_policy` - `cargo test --locked -p victory-gpu --features diagnostics --lib recorder_rejects_a_destination_inside_the_source_tree` - `git diff --check` Prepared with assistance from Codex.
MamaLeVrai commented 2026-11-27 11:40:21 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by MamaLeVrai on 2026-11-27T11:40:21Z.


Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At 3dca74f: victory-gpu 396 passed, 0 failed, 34 ignored; victory bins 25 passed.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7217342952 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/523#issuecomment-7217342952). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-27T11:40:21Z. --- Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At `3dca74f`: `victory-gpu` 396 passed, 0 failed, 34 ignored; `victory` bins 25 passed. AI-assisted (Claude Code); no game data.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/523:upstream-pr/523'
git switch 'upstream-pr/523'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'a-publier'
git merge --no-ff 'upstream-pr/523'
git switch 'upstream-pr/523'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'upstream-pr/523'
git switch 'upstream-pr/523'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'upstream-pr/523'
git switch 'a-publier'
git merge --squash 'upstream-pr/523'
git switch 'a-publier'
git merge --ff-only 'upstream-pr/523'
git switch 'a-publier'
git merge 'upstream-pr/523'
git push origin 'a-publier'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Belobug/VIctory-Belobug-AMD!523
No description provided.