XGameRuntime: save containers whose names do not fit a Windows path component #623

Closed
github-bot wants to merge 2 commits from gh-pr/623/head into gh-pr/623/base
Owner

@⁠milas6669 on GitHub · 2026-11-24 02:37 UTC · original
milas6669:xgameruntime-long-container-names → main · +299 −26 · 1 files · 2 commits · closed without merging

Stacked on #621; only the top commit belongs here.

The percent-encoded container name became a folder name over 255 characters, so creating the container failed. Only folders that cannot hold the name are shortened; the exact name goes in a side file that the container listing reads back. Names that fit are stored as before.

Fixes #326. Not covered: the blob-name length limit.

What is in it

  • gamesave.rs: MAX_FOLDER_NAME, container_folder(), the name file in XGameSaveCreateContainer, each_container, delete_path
  • tests container_folder_shortens_only_what_a_folder_cannot_hold and long_container_names_save_and_come_back_exact

Tested

  • RTX 3070, Windows 11 Pro 10.0.26200, MSVC 19.44, Rust 1.100.0, debug build
  • cargo test --workspace -- --test-threads=4: 649 passed, 0 failed, 21 ignored
  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)

Regression run

  • not run: no title on this machine to run scripts/smoke.ps1 against

Not tested

  • AMD, a retail title, scripts/smoke.ps1 main vs PR head

AI use

  • Claude Code, Claude Sonnet 5.5: wrote the code, the tests and this description. Reviewed and opened by the person submitting.
**@⁠milas6669** on GitHub · 2026-11-24 02:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/623) `milas6669:xgameruntime-long-container-names` → `main` · +299 −26 · 1 files · 2 commits · closed without merging Stacked on #621; only the top commit belongs here. The percent-encoded container name became a folder name over 255 characters, so creating the container failed. Only folders that cannot hold the name are shortened; the exact name goes in a side file that the container listing reads back. Names that fit are stored as before. Fixes #326. Not covered: the blob-name length limit. **What is in it** - `gamesave.rs`: `MAX_FOLDER_NAME`, `container_folder()`, the name file in `XGameSaveCreateContainer`, `each_container`, `delete_path` - tests `container_folder_shortens_only_what_a_folder_cannot_hold` and `long_container_names_save_and_come_back_exact` **Tested** - RTX 3070, Windows 11 Pro 10.0.26200, MSVC 19.44, Rust 1.100.0, debug build - `cargo test --workspace -- --test-threads=4`: 649 passed, 0 failed, 21 ignored - SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) **Regression run** - not run: no title on this machine to run `scripts/smoke.ps1` against **Not tested** - AMD, a retail title, `scripts/smoke.ps1` main vs PR head **AI use** - Claude Code, Claude Sonnet 5.5: wrote the code, the tests and this description. Reviewed and opened by the person submitting.
XGameSaveSubmitUpdate wrote each blob with its own temp-and-rename, so a write
that failed halfway left the container with some of the update applied.

Stage every blob of the update under a ~xcltmp. name first, then rename the
staged files into place in order; if a step fails, the steps already applied
are rolled back. The write_atomic helper had no other caller and is removed.

Fixes #324
A container name is percent-encoded into its folder name, which can exceed the
255-character limit of a path component, so creating the container failed.

Shorten only the folders that cannot hold the name and keep the exact name in a
side file that the container listing reads back. Names that fit are stored as
before, so existing saves are unchanged.

Stacked on the atomic save update (previous branch). Fixes #326
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:27:37 +00:00
github-bot closed this pull request 2026-11-26 04:27:37 +00:00
Author
Owner

@⁠milas6669 on GitHub · 2026-11-24 03:22 UTC · original

Closing: #481 (and #492) already cover this and were opened earlier. Please review those instead.

**@⁠milas6669** on GitHub · 2026-11-24 03:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/623#issuecomment-7121028760) Closing: #481 (and #492) already cover this and were opened earlier. Please review those instead.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.