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

Open
opened 2026-11-26 20:19:06 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/766
Author: @abnalstlll-byte
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: restore/old-10017-fs-temppath


📝 Commits (5)

  • 846b055 file_system: route console temporary paths to the overlay
  • d081e83 file_system: preserve temporary directory components
  • 17fbb03 file_system: preserve Unicode temporary paths
  • f7e3aa7 file_system: reject lossy temporary paths
  • df309d9 Fix GetTempPathA exact capacity return

📊 Changes

2 files changed (+246 additions, -0 deletions)

View changed files

📝 runtime/shims/file_system.cpp (+122 -0)
📝 runtime/test/file_system_test.cpp (+124 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/766 **Author:** [@abnalstlll-byte](https://github.com/abnalstlll-byte) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `restore/old-10017-fs-temppath` --- ### 📝 Commits (5) - [`846b055`](https://github.com/ubiquitarianism/leonida/commit/846b055bd75411146b0772015652b9d887803eb2) file_system: route console temporary paths to the overlay - [`d081e83`](https://github.com/ubiquitarianism/leonida/commit/d081e83a27f2ba792037a09c3e938d099a0ac266) file_system: preserve temporary directory components - [`17fbb03`](https://github.com/ubiquitarianism/leonida/commit/17fbb0323f7850dc166cd007561150dfd7640103) file_system: preserve Unicode temporary paths - [`f7e3aa7`](https://github.com/ubiquitarianism/leonida/commit/f7e3aa73733777ee73eb7a82ea47be5bdb6cf76c) file_system: reject lossy temporary paths - [`df309d9`](https://github.com/ubiquitarianism/leonida/commit/df309d9952879a5fc1e52b3f2ff259d391aa03d5) Fix GetTempPathA exact capacity return ### 📊 Changes **2 files changed** (+246 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/file_system.cpp` (+122 -0) 📝 `runtime/test/file_system_test.cpp` (+124 -0) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#804
No description provided.