RPF: commit an extracted record past MAX_PATH with a verbatim path #1072
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1072
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1072"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@iggyvilla on GitHub · 2026-11-24 11:17 UTC · original
iggyvilla:xcl-rpf-long-path→main· +68 −2 · 1 files · 1 commits · openxcl rpf --extract ... --out <folder>writes each record throughatomic_write_with, which moved its temporary file into place withMoveFileExWon the plain paths. That call fails with error 3 ("The system cannot find the path specified") for a path ofMAX_PATHcharacters or more, although the folder and the temporary file exist; std's own file calls add the\\?\prefix, this one did not. So an extraction into a deep output folder failed.move_pathnow givesMoveFileExWthe absolute path, prefixed with\\?\(or\\?\UNC\) when it is 260 characters or longer; shorter, verbatim and device paths are unchanged. The same mistake in the XGameSave code is #922's; this PR does not touch that file.What is in it
crates/xcl/src/rpf.rs:move_pathand its two uses inatomic_write_with(+68/-2 with tests).move_path_prefixes_only_what_is_past_max_path(drive, UNC, short, verbatim, verbatim UNC, device, the 259 and 260-character edges,..folded) andatomic_write_commits_past_max_path(a real write into a 300+ character path; it fails with error 3 without the change).Tested
cargo test -p xcl --lib rpf::tests: 7 passed, 0 failed, 0 ignored. Without the changeatomic_write_commits_past_max_pathfails withOs { code: 3, kind: NotFound }.cargo test --workspace --no-fail-fast -- --test-threads=4on6de9cf7: 726 passed, 3 failed, 41 ignored, 0 SKIPPED. The 3 failures are the ones already onmain:placed_title_textures_share_vram_and_preserve_pixels(also fails alone; the packed-mip bug #470 fixes), andtransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory(PoisonErrorafter it; they pass alone; #673).Regression run
The change is in
xcl rpf, which a title run does not reach, so this only shows that nothing else moved. After an unmeasured warm-up of each build, with no other build or title run on the machine, the runs alternated: head 446,main447,main445, head 444 frames; no device removals or crashes. The second pair is shown.main:This PR:
Not tested
xcl rpfon a real package into a deep folder (only the synthetic archive tests and the directatomic_writetest).MoveFileExWcallers (XGameSave: #922).AI use
claude-sonnet-5-5): wrote the change, the tests and this description, and ran the tests above.@futurepro62 on GitHub · 2026-11-24 14:25 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
6de9cf7(on its base6efdabc).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 729 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.move_path_prefixes_only_what_is_past_max_path,atomic_write_commits_past_max_path.Not tested
AI use
@kacper-serewis on GitHub · 2026-11-24 20:22 UTC · original
On
6de9cf7, a destination in NT form (\??\C:\...\record.bin; short path, existing folder) fails:atomic_writeworks on the base6efdabcand returns error 123 (ERROR_INVALID_NAME) with the PR.Tested: Windows 11, debug, CPU only.
std::path::absolutetreats\??\as a root-relative path. Suggested, at the top ofmove_path:With it on
6de9cf7the test below and the PR's own pass (cargo test -p xcl --lib rpf::: 8 passed, 0 failed).Test (append to rpf.rs)
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment; the suggested change was written with T3 Code (gpt-6.2-astra). I checked the points before posting.
@DavidM1911 on GitHub · 2026-11-25 08:51 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.