OLD-8161: restore old upstream PR 8161 - file_system: T: is a folder of each process's own in the overlay #684
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!684
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/684/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?
@aslan2142 on GitHub · 2026-11-24 11:56 UTC · original
aslan2142:t-drive-overlay→main· +391 −30 · 9 files · 4 commits · merged 2026-11-25 22:56 UTCClaimed in the coordination issue as: OLD-8161 #14
Restoration of my original pull request, old upstream PR 8161 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Ported onto main at21625bca8c; the port makesT:'s folder andreserve_unique_dir's creates go through main'swin32_io_path, keeps the scratch-folder exception in the write-open path, and points main's long-overlayT:check at the process's own folder.Depends on: #317 (textual conflict in
parse_console), #379 (conflict indocs/boot.md)What and why
T:\mapped to<overlay>\.gta6rt-temp, one folder shared by every run and kept between runs.CREATE_NEW.ERROR_FILE_EXISTS(80) and no report landed. This was old upstream issue 7913, measured by Spacecer2 under Wine 11.22.T:\now names<overlay>\.gta6rt-temp\<YYYYMMDD-HHMMSS-mmm>-pid<id>, using the process's start time in UTC and its id. On the console,T:is the title's own temporary drive, empty at launch and shared with no other run.rt::fs::reserve_unique_dirtakes the folder with a create-onlyCreateDirectoryW.-2,-3, ... up to 1000 names, so no run writes into an older folder.T:paths fail withERROR_INVALID_NAME.T:\..cannot climb into the shared folder.T:\still cannot be removed or moved.GAME:andG:are unchanged.console paths: GAME: -> ..., writes -> ..., T: -> ....rt::fs::scratch_dir()returns the folder.check_console_paths.cmake,check_game_dir.cmakeandtests/test_console_paths.pyexpect the new part.docs/boot.mdanddocs/runtime_imports.mddescribe the mapping.GetTempPath/GetTempFileNameresolve to the overlay scratch folder) is complementary, not a conflict. It drops the first partparse_consolereturns, so it lands in this process's folder too.Tested
Linux, Wine 11.22 (Staging), clang 23 targeting
x86_64-w64-mingw32(lld, static libstdc++). This is a local check only; the MSVC/W4 /permissive-build is left to CI.file_system_teston main (21625bca8): 494 checks, 11 failures.file_system.cpp(the new functions stubbed to main's behaviour): 519 checks, 27 failures, so the PR's checks add 16.CreateFileW(T:\crash.dmp, CREATE_NEW)fails with 80 in this process and in the second process.reserve_unique_dircheck fails.ReadFileinto uncommitted pages does not fail withERROR_NOACCESS(1);MAXIMUM_ALLOWEDwrite-opens of a package file throughCreateFileW,CreateFileAandCreateFile2(6);python -I tests/test_console_paths.py: OK.run_tiny_game_console_pathsandrun_tiny_game_dirneed the Windowsgta6rtbuild and are left to CI.git diff --checkis clean.python -I scripts/check_no_game_data.pyon the 9 changed files is clean.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code, Claude Opus 5.5).
@abnalstlll-byte on GitHub · 2026-11-24 12:20 UTC · original · approved these changes
Reviewed and verified OLD-8161 restoration. Isolating guest process T: scratch directories under .gta6rt-temp<timestamp>-pid via atomic
eserve_unique_dir with CreateDirectoryW prevents cross-run file collision errors (ERROR_FILE_EXISTS) during crash dump creation. CTest coverage in
untime/tests/file_system_test.cpp and standard-library test ests/test_console_paths.py fully validate path resolution and isolation. Excellent work, approved.
@aslan2142 on GitHub · 2026-11-25 22:56 UTC · original
Merged:
file_system:T:is a folder of each process's own in the overlay.mainmerged in. The one conflict was indocs/boot.md, wheremainaddedLEONIDA_WRITE_DIR/LEONIDA_SAVE_DIRto the--overlaybullet and a new "Under Wine on Linux" section. Both are kept, with theT:paragraph aftermain's sentences (c116c3fa2).main5fab93967with all nine of these runtime PRs merged together (#634, #643, #684, #657, #677, #638, #710, #688, #671), on llvmpipe and the gfx1036 iGPU (RADV): no test went from pass to fail.file_systemfails only on theBCryptOpenAlgorithmProvidercheck, as on the baseline.test_console_paths.pypasses.main6ef26a648+c116c3fa2: it merges cleanly; the semantic suite passes (493 files, 6,318 tests, 0 files failed); the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 9 changed files.AI-assisted (Claude Code, Claude Opus 5.5).
latencyframes in flight while armed (mailbox replace) #671