VFS: preserve external destination when overlay move fails #171
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!171
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/171/head"
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?
@mstr-vinegar on GitHub · 2026-11-23 18:45 UTC · original
mstr-vinegar:fix-overlay-external-move→main· +45 −0 · 1 files · 1 commits · merged 2026-11-23 20:51 UTCProblem
Moving an overlay file to a same-volume non-game path can overwrite the destination even when the move fails: copying succeeds, then deleting a source opened without delete sharing fails.
Use a native same-volume rename for this case so Windows checks sharing before replacing the destination. Preserve the existing fallback for cross-volume moves. This complements #160, which handles moves between game paths.
Verification
956a476, the new regression failed because the destination contained the source bytes after the failed move.cargo test --locked -p xcl vfs -- --test-threads=4: 16 passed, 0 failed (Windows 11, Rust 1.100.0 MSVC).Cross-volume and delayed moves retain their existing behavior and are not covered by this fix. AI-assisted implementation and testing.
@ivall on GitHub · 2026-11-23 20:52 UTC · original
Merged (main
2abc562), together with #160 - not a duplicate of it: #160 covers a destination inside the game folder, this one a destination outside it. The conflict was resolved by keeping both paths; the external one now calls #160'scommit_overlay_removal(sr)instead ofdelete_file(sr)(same effect: the original stays hidden and the move is recorded). Both tests are kept and pass. Checked on an RX 9070 (RDNA4) with the 11 PRs merged together on main38b05b7:cargo build --workspace && cargo test --workspace -- --test-threads=4- 547 unit tests passed, 0 failed (19 ignored); the integration and e2e tests passed too.