policy: resolve a .. in the not-yet-existing part of a path #937
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!937
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/937/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?
@nino-exe on GitHub · 2026-11-24 14:20 UTC · original
nino-exe:policy-resolve-dotdot→main· +13 −0 · 1 files · 1 commits · merged 2026-11-25 00:17 UTCWhat changed
resolvecanonicalizes the longest existing prefix and re-appends the rest, but it walks up withPath::file_name(), which isNonefor a trailing... A path like<tmp>/a/../bwhere nothing exists yet reached the_arm and returnedPolicyError::Io. So acache_dirordata_dircontaining a..under a directory that does not exist yet was rejected, andnormalize's..handling for the missing tail was never reached.A trailing
..is now kept inrest, sonormalizeresolves it lexically as its doc comment says.Test
resolves_dot_dot_in_a_path_that_does_not_exist_yetfails on main (theexpectonresolve) and passes with the change.cargo test -p victory-core: 12 passed.cargo fmt --checkandcargo clippy -p victory-core --testsclean. Windows 11, Rust 1.98.1 (MSVC). No game data used.Related but distinct: #310 changes the same function for the AppContainer canonicalize failure; this is about
..in a missing tail...in the not-yet-existing part of a path 52f0a099ed@dcastell1 on GitHub · 2026-11-24 14:35 UTC · original
Verified on native Windows (no Wine): NVIDIA GeForce RTX 5090 (driver 621.24), Windows 11 10.0.26300, Rust 1.98.1, MSVC 14.44.35207, debug build.
main@ffe310ebaseline on this box: 342 passed, 0 failed, 6 ignored.One more than the baseline; resolving
..in the not-yet-existing part of a path is exercised and green.Tree restored afterwards (full diff against a clean checkout); no game data, the tests are synthetic. AI-assisted (opencode): applied the patch to a built tree, ran
cargo test --workspace, reverted it.@pushkarreddyy on GitHub · 2026-11-24 14:43 UTC · original
Thanks @nino-exe for working on this and @dcastell1 for testing!
Heads-up that Issue #793 was claimed earlier (claim on #793) with our PR open at #973. It addresses both trailing
..whenfile_name()isNoneand Windows\\?\verbatim prefixes, clean under clippy warnings and already verified downstream in PR #14.We'd appreciate community testing and feedback on PR #973 as well to assist maintainers with landing the fix!
@Zipettte on GitHub · 2026-11-24 15:40 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
52f0a09:cargo test -p victory-corepasses, 12 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).