mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #684] [MERGED] OLD-8161: restore old upstream PR 8161 - file_system: T: is a folder of each process's own in the overlay #724
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#724
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/684
Author: @aslan2142
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:t-drive-overlay📝 Commits (4)
297ad86file_system: T: is a folder of each process's own in the overlay1d37e03file_system: reserve T:'s folder with a create-only call, never reuse one5866d69Merge main into OLD-8161, T: overlay folder per process (#684)c116c3fMerge main into t-drive-overlay📊 Changes
9 files changed (+391 additions, -30 deletions)
View changed files
📝
docs/boot.md(+10 -1)📝
docs/runtime_imports.md(+11 -4)📝
runtime/shims/file_system.cpp(+100 -7)📝
runtime/shims/file_system.h(+13 -0)📝
runtime/src/main.cpp(+7 -3)📝
runtime/test/check_console_paths.cmake(+3 -3)📝
runtime/test/check_game_dir.cmake(+3 -2)📝
runtime/test/file_system_test.cpp(+242 -9)📝
tests/test_console_paths.py(+2 -1)📄 Description
Claimed in the coordination issue as: OLD-8161 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7130586013
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).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.