VFS: a game folder on a network share is not protected from writes (follow-up to #579) #961
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#961
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Conrage on GitHub · 2026-11-24 09:35 UTC · original
Vfs::classify_withreturnsTarget::Passfor every path starting with\\before it compares the path with the game root:github.com/ivall/xcl@077ce40/crates/xcl/src/vfs.rs (L270-L272)When the game root is itself a UNC path (
\\server\share\Game), a title that opens a file by its absolute path (for example one built fromGetModuleFileNameW) bypasses the overlay and writes into the game folder. Console paths (D:\x,GAME:\x) are not affected because mounts are applied after this check and the result is compared with the game root.Today the launcher can't start such a game (it turns
\\?\UNC\…into a relativeUNC\…), but #579 fixes that. Once #579 merges, this breaks "the game folder is never modified". #316 adds tests asserting that UNC paths pass through, but doesn't cover a UNC game root.Expected:
classify_with(r"\\srv\share\Game\save.dat", …)with game root\\srv\share\GamereturnsTarget::Game { rel: "save.dat" }, as it does for a local root.Actual (from reading the code):
Target::Pass.Suggested fix: compare with the game root and XCL's own folders before the UNC early return, and let only UNC paths outside them pass. A unit test can inject
fullthe way the existingvfs.rstests do, so no share is needed.Not tested: found by reading the code; not run (no Windows machine).
AI use: found, checked and written up by Claude Code (Claude Opus 5.5) at my request.