file_system: GetTempPath and GetTempFileName resolve GAME:, G: and T: to overlay scratch (OLD-10017) #766

Closed
abnalstlll-byte wants to merge 5 commits from upstream-pr/766 into main
abnalstlll-byte commented 2026-11-24 13:35:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T13:35:16Z.


Restore old upstream PR 10017 (OLD-10017).

Implements \GetTempPathW, \GetTempPathA, \GetTempFileNameW, and \GetTempFileNameA\ shims routing console temporary directories (\GAME:, \G:, \T:) to the writable overlay's scratch directory (.gta6rt-temp).

  • Preserves subdirectory components within temporary paths
  • Preserves Unicode temporary paths and rejects unrepresentable ANSI conversions with \ERROR_NO_UNICODE_TRANSLATION\
  • Handles exact buffer capacity on \GetTempPathA\ when capacity matches path length without null terminator
  • Registers exports across kernel32, kernelbase, and api-ms-win-core-file-* sets

Clean-room verified; zero game data.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5473170344 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/766). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T13:35:16Z. --- Restore old upstream PR 10017 (OLD-10017). Implements \GetTempPathW\, \GetTempPathA\, \GetTempFileNameW\, and \GetTempFileNameA\ shims routing console temporary directories (\GAME:\, \G:\, \T:\) to the writable overlay's scratch directory (\.gta6rt-temp\). - Preserves subdirectory components within temporary paths - Preserves Unicode temporary paths and rejects unrepresentable ANSI conversions with \ERROR_NO_UNICODE_TRANSLATION\ - Handles exact buffer capacity on \GetTempPathA\ when capacity matches path length without null terminator - Registers exports across kernel32, kernelbase, and api-ms-win-core-file-* sets Clean-room verified; zero game data.
PierreEbele commented 2026-11-25 01:49:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T01:49:47Z.


Reviewed 540c8444. I read the 5-commit series (temp-path and temp-file shims, plus tests) and ran scripts/check_no_game_data.py on both changed files (clean). file_system_test is a Windows-only target, so it could not run here. On this head's windows CI job it passes (file_system ... Passed, 294/294). The red check job fails in Python test files this PR does not touch. The new test starts with resolve("kernel32.dll", "GetTempPathW"), which is null on main.

Read statically, these all look correct:

  • the TMP/TEMP decision table;
  • subpath preservation and scratch-only file creation;
  • lossy-ANSI rejection, with the just-created file removed;
  • the error paths (ERROR_INVALID_NAME, ERROR_PATH_NOT_FOUND).

Merges: clean against current origin/main. It conflicts with sibling PR #747 in file_system.cpp (same anchor, same FILE_API list), so whichever merges second needs a short rebase.

A question for the author's rig, not a blocker: at exact capacity, the tip commit returns required from W but the bare length from A. Please re-confirm that matrix. The test only checks the return value and that the byte past the buffer is untouched, so it cannot tell whether real Win32 also copies the path bytes in that branch. No findings. AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7150005358 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/766#issuecomment-7150005358). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T01:49:47Z. --- Reviewed 540c8444. I read the 5-commit series (temp-path and temp-file shims, plus tests) and ran `scripts/check_no_game_data.py` on both changed files (clean). `file_system_test` is a Windows-only target, so it could not run here. On this head's `windows` CI job it passes (`file_system ... Passed`, 294/294). The red `check` job fails in Python test files this PR does not touch. The new test starts with `resolve("kernel32.dll", "GetTempPathW")`, which is null on main. Read statically, these all look correct: - the TMP/TEMP decision table; - subpath preservation and scratch-only file creation; - lossy-ANSI rejection, with the just-created file removed; - the error paths (`ERROR_INVALID_NAME`, `ERROR_PATH_NOT_FOUND`). Merges: clean against current `origin/main`. It conflicts with sibling PR #747 in `file_system.cpp` (same anchor, same `FILE_API` list), so whichever merges second needs a short rebase. A question for the author's rig, not a blocker: at exact capacity, the tip commit returns `required` from W but the bare length from A. Please re-confirm that matrix. The test only checks the return value and that the byte past the buffer is untouched, so it cannot tell whether real Win32 also copies the path bytes in that branch. No findings. AI-assisted review. **Recommendation:** Merge
abnalstlll-byte commented 2026-11-25 21:49:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T21:49:36Z.


Rebased onto latest \main.
Verified \scripts/check_no_game_data.py\ (clean) on
untime/shims/file_system.cpp\ and
untime/test/file_system_test.cpp, and \git diff --check.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7175587850 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/766#issuecomment-7175587850). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-25T21:49:36Z. --- Rebased onto latest \main\. Verified \scripts/check_no_game_data.py\ (clean) on \ untime/shims/file_system.cpp\ and \ untime/test/file_system_test.cpp\, and \git diff --check\. AI-assisted (Claude Code, Claude Opus 5.5).
MoonEyes commented 2026-11-28 17:57:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T17:57:29Z.


Hi @abnalstlll-byte, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/shims/file_system.cpp), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243418101 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/766#issuecomment-7243418101). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T17:57:29Z. --- Hi @abnalstlll-byte, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/shims/file_system.cpp`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
OreoFR commented 2026-11-28 21:43:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:43:44Z.


Verified by OreoFR

  • Base: main c1ecf04ed + PR head df309d995
  • Test: not run (merge conflict with main)
  • Red on main: not run
  • Green with the PR: not run
  • Verdict: CONFLICT (conflicts with main in runtime/shims/file_system.cpp (1 hunk, at main's get_disk_free_space_ex_w))
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246228601 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/766#issuecomment-7246228601). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:43:44Z. --- **Verified by OreoFR** - Base: main `c1ecf04ed` + PR head `df309d995` - Test: not run (merge conflict with main) - Red on main: not run - Green with the PR: not run - Verdict: CONFLICT (conflicts with main in runtime/shims/file_system.cpp (1 hunk, at main's get_disk_free_space_ex_w)) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-12-01 16:31:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:31:23Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317746356 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/766#issuecomment-7317746356). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:31:23Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!766
No description provided.