HLE: clean dot parts in extended virtual-drive paths #421
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!421
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/421/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?
@enzoduarte1 on GitHub · 2026-11-24 03:12 UTC · original
enzoduarte1:hle/verbatim-tail-normalization→main· +34 −17 · 1 files · 1 commits · closed without mergingWhat
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 #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).@jeremygold02 on GitHub · 2026-11-24 04:40 UTC · original
Thanks @enzoduarte1 for applying path cleanup to already-prefixed virtual-drive paths. I tested head
1d0f48a93f04dde16dd9d414737254739f1800b6with: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.
@Marvisak on GitHub · 2026-11-25 00:29 UTC · original
Automated triage for the maintainers.
Merge candidate.
translateincrates/victory-hle/src/modules/files.rsnow sends paths that already have the\\?\prefix throughverbatim(), the helper used for long paths. With that prefix the host does no clean-up, so.and..used to reach the filesystem as literal names; it also fixes a UNC drive root and a root that already had the prefix (which was doubled). The empty-tail,X:nameand plain cases check out againstverbatim(), the non-prefixed branch is unchanged, and the new test covers each case.CI:
checkpassing.Generated by Claude Code
@Marvisak on GitHub · 2026-11-25 21:58 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing as a subset of #1772, which makes the same change to
translate(any\\?\title path goes throughverbatim()) and covers more:\\?\host roots, drive-root mounts andGetDiskFreeSpaceWvolume roots. The two conflict infiles.rs, and the only difference left here is a trailing backslash that names the same folder either way.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed