fix: find MicrosoftGame.config whatever the case of its name (Linux) #237

Merged
lcg007xd-c merged 1 commit from upstream-pr/237 into main 2026-11-25 21:07:38 +00:00
lcg007xd-c commented 2026-11-25 20:44:12 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by lcg007xd-c on 2026-11-25T20:44:12Z.


Change

read_package() (emu/config.py) and the two package-folder probes of scarlett.py only looked for MicrosoftGame.Config. Microsoft Learn and the GDK name the file MicrosoftGame.config (lower-case c). Windows ignores the difference; a case-sensitive file system (Linux, the Proton path of #228) does not, so a real package folder was refused there with Erreur : Le dossier choisi ne contient pas MicrosoftGame.Config.

Evidence on main (4f2cf5c), Linux, Python 3.14: two existing tests whose fixtures write MicrosoftGame.config fail for exactly this reason:

FAILED tests/test_jour_j.py::test_native_report_inventories_only_psos_from_the_current_run
FAILED tests/test_jour_j.py::test_missing_executable_is_reported
  AssertionError: assert 'absent.exe' in 'Erreur : Le dossier choisi ne contient pas MicrosoftGame.Config.\n'

Now emu.config.manifest_path(folder) returns the exact name if present, else the first file of the folder whose lowered name is microsoftgame.config (a directory with that name is not taken). read_package() and scarlett.py (App.__init__, find_package_folder) use it. Nothing changes on Windows.

Linked issue: none.

Verification

Linux (Arch, Python 3.14.10, no C++ runtime, no GPU — the runtime and GPU tests skip):

python -m pytest                → 4 failed, 1014 passed, 315 skipped
python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools → All checks passed!

The 4 remaining failures are in tests/test_rdna2_exec_fma.py and are unrelated (NaN quieting on Python 3.14, fixed separately). Before this change the same run had 6 failures: the two test_jour_j.py tests above now pass.

Not run: the Windows CI job (C++ runtime, Rust, WARP); no C++ or Rust is touched.

Oracle and test data

  • New tests in tests/test_config.py: the manifest is found as MicrosoftGame.config and microsoftgame.CONFIG, the exact name wins when both exist, and a directory named like the manifest is still refused. They fail without the change (on Linux; on Windows the first one passes either way since NTFS ignores case).
  • Test data is built in the tests.

Checklist

  • The PR covers a single reviewable behaviour.
  • A test fails without this change and passes with it.
  • The commands and results of each check are given above.
  • An unimplemented function returns an error (E_NOTIMPL), never a fake success.
  • README: the same change in all 9 languages (test_readme_sync.py checks it). (No README change; the suite still counts 1300+.)
  • No game, console or SDK file, no key, no dump, no download link.
  • Findings drawn from a title: none.
  • Code taken from another project: none.

Made with AI assistance (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:6613384848 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/237). Originally posted by [lcg007xd-c](https://github.com/lcg007xd-c) on 2026-11-25T20:44:12Z. --- ## Change `read_package()` (`emu/config.py`) and the two package-folder probes of `scarlett.py` only looked for `MicrosoftGame.Config`. Microsoft Learn and the GDK name the file **`MicrosoftGame.config`** (lower-case `c`). Windows ignores the difference; a case-sensitive file system (Linux, the Proton path of #228) does not, so a real package folder was refused there with `Erreur : Le dossier choisi ne contient pas MicrosoftGame.Config.` Evidence on `main` (`4f2cf5c`), Linux, Python 3.14: two existing tests whose fixtures write `MicrosoftGame.config` fail for exactly this reason: ``` FAILED tests/test_jour_j.py::test_native_report_inventories_only_psos_from_the_current_run FAILED tests/test_jour_j.py::test_missing_executable_is_reported AssertionError: assert 'absent.exe' in 'Erreur : Le dossier choisi ne contient pas MicrosoftGame.Config.\n' ``` Now `emu.config.manifest_path(folder)` returns the exact name if present, else the first file of the folder whose lowered name is `microsoftgame.config` (a directory with that name is not taken). `read_package()` and `scarlett.py` (`App.__init__`, `find_package_folder`) use it. Nothing changes on Windows. Linked issue: none. ## Verification Linux (Arch, Python 3.14.10, no C++ runtime, no GPU — the runtime and GPU tests skip): ``` python -m pytest → 4 failed, 1014 passed, 315 skipped python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools → All checks passed! ``` The 4 remaining failures are in `tests/test_rdna2_exec_fma.py` and are unrelated (NaN quieting on Python 3.14, fixed separately). Before this change the same run had 6 failures: the two `test_jour_j.py` tests above now pass. Not run: the Windows CI job (C++ runtime, Rust, WARP); no C++ or Rust is touched. ## Oracle and test data - New tests in `tests/test_config.py`: the manifest is found as `MicrosoftGame.config` and `microsoftgame.CONFIG`, the exact name wins when both exist, and a directory named like the manifest is still refused. They fail without the change (on Linux; on Windows the first one passes either way since NTFS ignores case). - Test data is built in the tests. ## Checklist - [x] The PR covers a single reviewable behaviour. - [x] A test fails without this change and passes with it. - [x] The commands and results of each check are given above. - [x] An unimplemented function returns an error (`E_NOTIMPL`), never a fake success. - [x] README: the same change in all 9 languages (`test_readme_sync.py` checks it). (No README change; the suite still counts `1300+`.) - [x] No game, console or SDK file, no key, no dump, no download link. - [x] Findings drawn from a title: none. - [x] Code taken from another project: none. Made with AI assistance (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
LooperSalty/AnyXboxX!237
No description provided.