Repository navigation
Conversation
atomic_write_with moved its temporary file into place with MoveFileExW on the plain paths. That call fails with error 3 (path not found) for a path of MAX_PATH characters or more, although the folder and the temporary file exist (std's own file calls add the \\?\ prefix, this one does not). So `xcl rpf --extract ... --out <deep folder>` failed on records whose output path is 260 characters or longer. move_path gives MoveFileExW the absolute path, prefixed with \\?\ (or \\?\UNC\) when it is 260 characters or longer; shorter, verbatim and device paths are unchanged. Assisted-by: Claude Code (Claude Sonnet 5.5)
Owner
Author
|
Upstream PR xcl-dev#1072 was closed or merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xcl 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 xcl-dev#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 D3D12.X: map a one-slice title texture's packed mips where D3D12 addresses them xcl-dev/xcl#470 fixes), andtransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory(PoisonErrorafter it; they pass alone; Tests: a panicking title-texture test no longer poisons the others xcl-dev/xcl#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: XGameRuntime: prefix MoveFileExW paths with \\?\ past MAX_PATH (#722) xcl-dev/xcl#922).AI use
claude-sonnet-5-5): wrote the change, the tests and this description, and ran the tests above.Mirror of xcl-dev#1072 (auto-synced, do not edit).