[PR #929] [CLOSED] file_system: list T: scratch from the overlay with no game dir (FS-COLLECT-SCRATCH) #966

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/929
Author: @morodirule
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: fix/fs-collect-scratch


📝 Commits (4)

  • 93511b1 shims: guard SEH __try behind _MSC_VER for MinGW (MINGW-SEH-GUARD)
  • 7e47b21 dstorage: reject wrapped MinGW buffer ranges before VirtualQuery
  • 85c78e2 dstorage: let MinGW guarded_move reach guard pages like MSVC
  • 5a0d521 file_system: list T: scratch from the overlay with no game dir (FS-COLLECT-SCRATCH)

📊 Changes

3 files changed (+74 additions, -2 deletions)

View changed files

📝 runtime/shims/dstorage.cpp (+47 -0)
📝 runtime/shims/file_system.cpp (+15 -2)
📝 runtime/test/file_system_test.cpp (+12 -0)

📄 Description

Claimed in the coordination issue as: FS-COLLECT-SCRATCH

Depends on: #903 (the test binary needs the MinGW SEH guard to link).

Carries abnalstlll-byte's finding: collect() failed T: scratch listings with ERROR_PATH_NOT_FOUND when --game-dir was unset (gated on r.game.empty()), and probed the package root on every T: listing. Scratch targets (parts starting at .gta6rt-temp) now gate on r.overlay.empty() instead and skip add_root(r.game).

Tests: built file_system_test with x86_64-w64-mingw32-g++ and ran it under Wine 11.22 on Linux: 496 checks, 11 failures — the identical failure set as the pre-change baseline binary (494 checks, same 11: MAXIMUM_ALLOWED opens, long-path markers, host ReadFile page-commit semantics — all Wine-environment behavior, none touched by this change). The 2 new regression checks pass:

  • without a game folder FindFirstFileW(T:*) still lists the scratch root as . and ..
  • listing T: creates the scratch folder in the overlay
    check_no_game_data.py PASS. No game files (synthetic overlay dirs), no GPU. MSVC compile not available on this machine.

AI-assisted.


🔄 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/929 **Author:** [@morodirule](https://github.com/morodirule) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/fs-collect-scratch` --- ### 📝 Commits (4) - [`93511b1`](https://github.com/ubiquitarianism/leonida/commit/93511b1faa1e944126364caf16b3d96e4854b70e) shims: guard SEH __try behind _MSC_VER for MinGW (MINGW-SEH-GUARD) - [`7e47b21`](https://github.com/ubiquitarianism/leonida/commit/7e47b210dac7bbd33948059239e34b53272780e2) dstorage: reject wrapped MinGW buffer ranges before VirtualQuery - [`85c78e2`](https://github.com/ubiquitarianism/leonida/commit/85c78e20f716a5bdf3d43a93e7ccf74def38fc7b) dstorage: let MinGW guarded_move reach guard pages like MSVC - [`5a0d521`](https://github.com/ubiquitarianism/leonida/commit/5a0d521c2e3ce50bc51b24b3f4704ed428c9e68c) file_system: list T: scratch from the overlay with no game dir (FS-COLLECT-SCRATCH) ### 📊 Changes **3 files changed** (+74 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/dstorage.cpp` (+47 -0) 📝 `runtime/shims/file_system.cpp` (+15 -2) 📝 `runtime/test/file_system_test.cpp` (+12 -0) </details> ### 📄 Description Claimed in the coordination issue as: FS-COLLECT-SCRATCH Depends on: #903 (the test binary needs the MinGW SEH guard to link). Carries abnalstlll-byte's finding: collect() failed T: scratch listings with ERROR_PATH_NOT_FOUND when --game-dir was unset (gated on r.game.empty()), and probed the package root on every T: listing. Scratch targets (parts starting at .gta6rt-temp) now gate on r.overlay.empty() instead and skip add_root(r.game). Tests: built file_system_test with x86_64-w64-mingw32-g++ and ran it under Wine 11.22 on Linux: 496 checks, 11 failures — the identical failure set as the pre-change baseline binary (494 checks, same 11: MAXIMUM_ALLOWED opens, long-path markers, host ReadFile page-commit semantics — all Wine-environment behavior, none touched by this change). The 2 new regression checks pass: - without a game folder FindFirstFileW(T:\*) still lists the scratch root as . and .. - listing T: creates the scratch folder in the overlay check_no_game_data.py PASS. No game files (synthetic overlay dirs), no GPU. MSVC compile not available on this machine. AI-assisted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:38 +01:00
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#966
No description provided.