Repository navigation
HLE: clean dot parts in extended virtual-drive paths - #421
enzoduarte1 wants to merge 1 commit into
Conversation
|
Thanks @enzoduarte1 for applying path cleanup to already-prefixed virtual-drive paths. I tested head Result: 5 passed, 0 failed (82 filtered out). The tests include extended-path dot-part cleanup and cover mounted-drive rewriting, long paths, title file calls, and reads into the supplied buffer. These are synthetic HLE file/path tests, not a title file workflow. |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 1d0f48a on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (265 passed, 0 failed).
-
\?\paths now go throughverbatim, which also fixes a latent issue: if the mount root itself already starts with\?\or is a UNC share, the old code put a second\?\in front of it, andverbatimhandles both cases. -
The short path without the prefix produces the same output as before (
root, a separator if needed, then the raw tail), so #182's area is not touched. -
Two behaviour changes for
\?\paths that are worth knowing, not blocking:- A trailing separator is now dropped (
\?\J:/a/becomes…\a). ..at the drive root is clamped to the root instead of being passed to the host.
Both match what the long-path branch already did.
- A trailing separator is now dropped (
No issues found.
AI-assisted (Claude Code).
…ual-drive paths Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1d0f48a to
83b2037
Compare
|
Automated triage for the maintainers. Merge candidate. CI: Generated by Claude Code |
Adapt upstream PR Marvisak#421 at 83b2037. Reuse verbatim cleanup for extended title paths while preserving the local non-extended parent-directory clamp. Keep a separator for cleaned roots and trailing directory separators, including host drive roots. Add regressions for ordinary and verbatim drive/UNC roots. (adapted from commit 83b2037)
…drive roots Adapt source 83b2037 through candidate ed600eb and follow-up 20782e9. Preserve local parent clamping, root/trailing separators and test isolation. Source/candidate tests, negative controls, twenty parallel file-test runs and complete combined integration gate passed. Non-fast-forward merge as requested.
What
translate()only calledverbatim()when the title omitted\\?\and the path was long. A short path that already had the prefix, such as\\?\G:/a/./b/../f.txt, had only/replaced by\:.and..were passed through literally.That form disables Win32 path cleanup on the host, so those components become real directory names and the file lands in the wrong place (or nowhere). Extended-prefix paths now go through the same cleaning helper as long paths, which resolves
.and..against the virtual drive root. A new test covers dot parts, a bare drive root, a relative tail and a plain extended path.This complements PR #182, which handles
..in paths without the extended prefix; it does not change that branch's behavior.Tested
x86_64-pc-windows-gnu(no MSVC linker on this machine).cargo test -p victory-hle --lib files::: 5 passed.cargo test --workspace --exclude victory-loader -- --test-threads=1: all suites passed.cargo clippy -p victory-hle --all-targets -- -A clippy::field_reassign_with_default -D warnings: clean. The allowed lint is the pre-existing warning fixed by PR Chore: clear two workspace Clippy errors #355.git diff --check: clean.rustfmt --checkpasses except for one unrelated pre-existing line in this file; that line was left untouched to keep the diff focused.cargo xtask policy: 151 files ok. No game files or data taken from them were added.cargo test -p victory-loader --test load_probe. Its fixture passes MSVC's/DELAYLOADflag, which MinGW rejects here; the same failure occurs on unmodifiedmain.Checklist
cargo fmt,cargo clippy --workspace --all-targetsandcargo test --workspacepass — see the toolchain limitations above; the changed crate is clean.cargo xtask policypasses. The change adds no game files or data taken from them (docs/asset-policy.md).