VFS: a console drive mount leaves the PC's own folders on that drive #49
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!49
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/49/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?
@gefydev on GitHub · 2026-11-22 22:21 UTC · original
gefydev:vfs-host-drive-paths→main· +64 −16 · 1 files · 1 commits · merged 2026-11-22 22:31 UTCWith the repository, a game or XCL's data on the PC's D: drive, the default
D:mount (the package drive, for paths liked:\hunter\...) translated the PC's own paths too. Onmain, the e2e test fails for that reason when the repository is on D:. The host can't read the game's exe:D:\xcl-test\...\game\xcl_testtitle.exebecame<game>\xcl-test\...\game\xcl_testtitle.exe.Two changes in
vfs.rs:D:\hunter\...) still go to the game folder.<cwd>\GAME:\x, when a runtime treatsGAME:\xas relative) is now looked for before the drive mounts. With only the first change, the test title ran on D: but one check still failed: with the current directory on D:, theD:mount tookD:\...\GAME:\data\...first ([FAIL] files: console paths G:\ and GAME: read from the game folder: ... (os error 123)).One ambiguity is left: a console path that happens to land inside the game folder's real location (a game installed at
D:\hunterreadingD:\hunter\x) is now taken as the PC path. I don't think that's worth more logic.Validation
a_console_drive_mount_leaves_the_pcs_own_folders_on_that_drivemounts the drive that holds the test folders. Onmainit fails on both cases above.cargo test --workspace --release --no-fail-fast:main(055b0ad):test_title_runs_and_game_folder_is_untouchedfails with the error above. Everything else passes.cargo test -p xcl --libon Windows GNU under Wine passes too.The default "D:" mount (the package drive, XDefiant's d:\hunter\...) translated every path on the PC's D: drive. With the game or XCL's data on D:, the host could not read the game's exe: D:\games\x\game.exe became <game>\games\x\game.exe ("loading the game failed: ... os error 3"). The e2e test fails this way when the repository is on D:. - A plain drive path that is already inside the game folder or the title's data folder is left alone. Console paths on that drive ("D:\hunter\...") still go to the game folder. - An embedded console mount ("<cwd>\GAME:\x", "GAME:\x" made relative by a runtime) is looked for before the drive mounts. With the current directory on D:, the "D:" mount took it first and the title's GAME:\ reads failed with ERROR_INVALID_NAME.@ivall on GitHub · 2026-11-22 22:31 UTC · original
Thanks, merged! This is the third fix for this bug (#33 and #35 had their own takes inside bigger PRs), and the smallest and clearest one. Checking for an embedded
GAME:before the drive mounts is a good catch too.I tested it on top of current
mainwith the MSVC toolchain on Windows: all tests pass, 339 lib tests with your new one, the e2e test title, and the GPU tests. My games and the repository are on C: and E:, so theD:mount doesn't overlap here. Still, every file the title opens goes throughclassify, so I also ran two of the heaviest file readers:CreateFile2) reaches its title screen;.cpkarchives throughCreateFileA) shows its title screen.Neither had a file error in the log.
The ambiguity you mention is fine by me: a console path that happens to equal the game folder's real location on the same drive.