[PR #317] file_system: GetVolumeInformation and GetVolumePathName answer for the GAME: and T: roots #369

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/317
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/10051


📝 Commits (5)

  • bf9ee6c file_system: resolve virtual drive volume queries
  • 375782e file_system: make volume queries read-only and Unicode-safe
  • c56e778 file_system: keep T volume queries read-only
  • 0fdb940 file_system: keep overlay volume identity stable
  • 468b75a file_system: map G volume to package

📊 Changes

2 files changed (+194 additions, -2 deletions)

View changed files

📝 runtime/shims/file_system.cpp (+97 -2)
📝 runtime/test/file_system_test.cpp (+97 -0)

📄 Description

Carried over from old PR 10051 by tedin7 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/10051, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
tedin7: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

@ItsNotRexed: an exe PR, as you asked.

Rebased cleanly on current main; supersedes #8669 closed during org migration.

What

GetVolumeInformationA/W and GetVolumePathNameA/W in runtime/shims/file_system.cpp answer for the console GAME:/G: and T: roots. G: reports the host package volume, T: the volume of the overlay's nearest existing ancestor (stable before and after the overlay exists). The queries are read-only (they never create the overlay), Unicode-safe, reject a short buffer, and pass host paths through. One small change in parse_console: a create_scratch flag so a query does not create the scratch folder.

Why

Before this, the console roots fell through to the host and returned the wrong volume or failed.

Tested

file_system_test (clang-cl cross build, run under Wine): +97 lines of checks.

  • With the fix: 511 checks, 7 failures.
  • Negative control (shim reverted to origin/main, same test file): 30 failures, 23 of them the new volume checks.
  • The 7 remaining failures (MAXIMUM_ALLOWED CreateFile x6, *.? listing x1) are identical on main, Wine-only, unrelated.

🔄 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/317 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/10051` --- ### 📝 Commits (5) - [`bf9ee6c`](https://github.com/ubiquitarianism/leonida/commit/bf9ee6c558acc22cfb6f32a5596dde87487dc04c) file_system: resolve virtual drive volume queries - [`375782e`](https://github.com/ubiquitarianism/leonida/commit/375782e7de50a33564eaf3607683a993e0e91ffe) file_system: make volume queries read-only and Unicode-safe - [`c56e778`](https://github.com/ubiquitarianism/leonida/commit/c56e7787d862fe3176b3e5ae9a44bcb97da8965b) file_system: keep T volume queries read-only - [`0fdb940`](https://github.com/ubiquitarianism/leonida/commit/0fdb940cf4da7fc662d5592ea68f668223afb575) file_system: keep overlay volume identity stable - [`468b75a`](https://github.com/ubiquitarianism/leonida/commit/468b75ad1e3dbb7f17d344013b4b95a3c80e8d07) file_system: map G volume to package ### 📊 Changes **2 files changed** (+194 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/file_system.cpp` (+97 -2) 📝 `runtime/test/file_system_test.cpp` (+97 -0) </details> ### 📄 Description > Carried over from **old PR 10051** by `tedin7` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/10051`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `tedin7`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): `@ItsNotRexed`: an exe PR, as you asked. Rebased cleanly on current main; supersedes `#8669` closed during org migration. ## What GetVolumeInformationA/W and GetVolumePathNameA/W in `runtime/shims/file_system.cpp` answer for the console GAME:/G: and T: roots. G: reports the host package volume, T: the volume of the overlay's nearest existing ancestor (stable before and after the overlay exists). The queries are read-only (they never create the overlay), Unicode-safe, reject a short buffer, and pass host paths through. One small change in `parse_console`: a `create_scratch` flag so a query does not create the scratch folder. ## Why Before this, the console roots fell through to the host and returned the wrong volume or failed. ## Tested `file_system_test` (clang-cl cross build, run under Wine): +97 lines of checks. - With the fix: 511 checks, 7 failures. - Negative control (shim reverted to origin/main, same test file): 30 failures, 23 of them the new volume checks. - The 7 remaining failures (MAXIMUM_ALLOWED CreateFile x6, `*.?` listing x1) are identical on main, Wine-only, unrelated. --- <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#369
No description provided.