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

Closed
leonida/mandy
abnalstlll-byte wants to merge 0 commits from restore/old-10017-fs-temppath into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

abnalstlll-byte commented 2026-11-24 13:35:16 +00:00

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.

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

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

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

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).

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

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).

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

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).

**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

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.

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.
Sign in to join this conversation.
No description provided.