Ignore AppleDouble metadata when checking game archives #3616

Open
github-bot wants to merge 1 commit from github-bot/gh-3616 into main AGit
Owner

@⁠DBSN-code on GitHub · 2026-11-30 01:45 UTC · original
DBSN-code:fix/appledouble-sidecars-05 → main · +26 −1 · 1 files · 1 commits · open

What it changes

The startup check added in #1217 inspects every file with an RPF extension next to the executable and under pack/. A directory copied from macOS can contain both levels.rpf and its metadata file, ._levels.rpf. The metadata file has an AppleDouble header and can make the launcher stop even when the actual archive passes the RPF9 check.

Recognize an AppleDouble sidecar by both its ._ filename prefix and its four-byte signature. Other files with RPF extensions still go through the existing header check. The fix is confined to the Windows startup scan.

How it was tested

The regression test creates synthetic files in a temporary directory, including a nested pack/ folder and an uppercase .RPF extension. The original scanner listed both sidecars as damaged. With the fix it accepts the fixture. It still reports a ._ file with an unrelated header and a normally named archive with an AppleDouble header.

On Windows, cargo test --locked --offline --release -p victory passed on top of 41adb551. All 81 unit tests and all 3 integration tests passed.

Checked for overlap

Searched for AppleDouble, archive sidecars, macOS RPF metadata and the startup archive scan. The relevant prior change is #1217, which introduced this check.

**@⁠DBSN-code** on GitHub · 2026-11-30 01:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3616) `DBSN-code:fix/appledouble-sidecars-05` → `main` · +26 −1 · 1 files · 1 commits · open ## What it changes The startup check added in #1217 inspects every file with an RPF extension next to the executable and under `pack/`. A directory copied from macOS can contain both `levels.rpf` and its metadata file, `._levels.rpf`. The metadata file has an AppleDouble header and can make the launcher stop even when the actual archive passes the RPF9 check. Recognize an AppleDouble sidecar by both its `._` filename prefix and its four-byte signature. Other files with RPF extensions still go through the existing header check. The fix is confined to the Windows startup scan. ## How it was tested The regression test creates synthetic files in a temporary directory, including a nested `pack/` folder and an uppercase `.RPF` extension. The original scanner listed both sidecars as damaged. With the fix it accepts the fixture. It still reports a `._` file with an unrelated header and a normally named archive with an AppleDouble header. On Windows, `cargo test --locked --offline --release -p victory` passed on top of `41adb551`. All 81 unit tests and all 3 integration tests passed. ## Checked for overlap Searched for AppleDouble, archive sidecars, macOS RPF metadata and the startup archive scan. The relevant prior change is #1217, which introduced this check.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 01:48:38 +00:00
Author
Owner

@⁠Trillazill on GitHub · 2026-11-30 05:39 UTC · original

Reviewed against 41adb551, and it looks right to me.

  • cargo test --locked -p victory: 84 passed (81 + 1 + 2), including the new test. cargo clippy --locked -p victory --all-targets -- -D warnings reports nothing in apps/.
  • Needing both the ._ prefix and the 00 05 16 07 signature is the right pairing. The test's second half shows a real archive with that header, or a ._ file with another one, is still named.
  • missing_archives isn't affected by sidecars either way: ._appdata0.rpf doesn't start with appdata0, so it never shows up as a "renamed copy" of a missing archive. That fits, because the sidecar isn't one.

One small thing: damaged_archives' doc comment still says "every .rpf beside the executable and under its pack folder". A clause such as "(macOS's ._ AppleDouble sidecars aside)" would keep it matching the code.

**@⁠Trillazill** on GitHub · 2026-11-30 05:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3616#issuecomment-7269884902) Reviewed against 41adb551, and it looks right to me. - `cargo test --locked -p victory`: 84 passed (81 + 1 + 2), including the new test. `cargo clippy --locked -p victory --all-targets -- -D warnings` reports nothing in `apps/`. - Needing both the `._` prefix and the `00 05 16 07` signature is the right pairing. The test's second half shows a real archive with that header, or a `._` file with another one, is still named. - `missing_archives` isn't affected by sidecars either way: `._appdata0.rpf` doesn't start with `appdata0`, so it never shows up as a "renamed copy" of a missing archive. That fits, because the sidecar isn't one. One small thing: `damaged_archives`' doc comment still says "every `.rpf` beside the executable and under its `pack` folder". A clause such as "(macOS's `._` AppleDouble sidecars aside)" would keep it matching the code.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3616/head:github-bot/gh-3616'
git switch 'github-bot/gh-3616'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3616'
git switch 'github-bot/gh-3616'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3616'
git switch 'github-bot/gh-3616'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3616'
git switch 'main'
git merge --squash 'github-bot/gh-3616'
git switch 'main'
git merge --ff-only 'github-bot/gh-3616'
git switch 'main'
git merge 'github-bot/gh-3616'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3616
No description provided.