[PR #271] [CLOSED] file_system: a GAME: name inside a missing folder fails with ERROR_PATH_NOT_FOUND, as on the host #323

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

📋 Pull Request Information

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

Base: main ← Head: old-pr/10004


📝 Commits (1)

  • 7e7a0d9 file_system: a GAME: name inside a missing folder fails with ERROR_PATH_NOT_FOUND, as on the host

📊 Changes

3 files changed (+56 additions, -10 deletions)

View changed files

📝 docs/runtime_imports.md (+3 -1)
📝 runtime/shims/file_system.cpp (+8 -7)
📝 runtime/test/file_system_test.cpp (+45 -2)

📄 Description

Carried over from old PR 10004 by AirKyzzZ in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/10004, 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.
AirKyzzZ: 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):

Claimed in the coordination issue as: new RT item (claim). Resubmits #7316, closed in the reset.

What and why

DeleteFile, RemoveDirectory, SetFileAttributes and the source of MoveFile(Ex) answered every GAME: name the title can't see with ERROR_FILE_NOT_FOUND. The host tells two cases apart: a name inside a folder that is missing, or below a file, is ERROR_PATH_NOT_FOUND, and only a missing name in a folder that exists is ERROR_FILE_NOT_FOUND. Measured on Windows 10 22H2 with the real calls on a scratch folder: 3 for all four calls on missing\x.txt, missing\deeper\x.txt and file.txt\x.txt, 2 for nope.txt. CreateDirectory, CopyFile, the write opens and FindFirstFile already make that split here.

The four calls now pick the error with the same is_folder(parent_of(parts)) test the others use, so a folder the title removed counts as missing too. One existing check expected ERROR_FILE_NOT_FOUND for DeleteFileW(GAME:\nope\missing.txt), where nope doesn't exist; it now expects ERROR_PATH_NOT_FOUND, the host's answer. One sentence in docs/runtime_imports.md.

Same change as #7316, on top of current main (d083a2c); the only conflict was main renaming join to disk_path on the MoveFile line.

Tested

Windows 10 22H2 (19045), RTX 2060 / NVIDIA 566.14, Ryzen 5 2600X, clang-cl 23.1.6 + lld-link, MSVC 14.44 STL, Windows SDK 10.0.26100, Ninja:

  • This head's tree: ctest file_system passes.
  • On #7316 (b9c590fd2): file_system_test 457 checks OK; with main's file_system.cpp it failed 9 (the 8 new path-not-found checks and the updated one).
  • Outside checks on #7316: review, Windows (MSVC), RTX 5090, RTX 4070.

No game files. AI-assisted (Claude Code).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (no translator change)

🔄 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/271 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `old-pr/10004` --- ### 📝 Commits (1) - [`7e7a0d9`](https://github.com/ubiquitarianism/leonida/commit/7e7a0d952aabff4fce5c9be58acd5a5067c641f4) file_system: a GAME: name inside a missing folder fails with ERROR_PATH_NOT_FOUND, as on the host ### 📊 Changes **3 files changed** (+56 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/runtime_imports.md` (+3 -1) 📝 `runtime/shims/file_system.cpp` (+8 -7) 📝 `runtime/test/file_system_test.cpp` (+45 -2) </details> ### 📄 Description > Carried over from **old PR 10004** by `AirKyzzZ` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/10004`, 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. > `AirKyzzZ`: 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): Claimed in the coordination issue as: new RT item ([claim](https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116988678)). Resubmits `#7316`, closed in the reset. ### What and why `DeleteFile`, `RemoveDirectory`, `SetFileAttributes` and the source of `MoveFile(Ex)` answered every `GAME:` name the title can't see with `ERROR_FILE_NOT_FOUND`. The host tells two cases apart: a name inside a folder that is missing, or below a file, is `ERROR_PATH_NOT_FOUND`, and only a missing name in a folder that exists is `ERROR_FILE_NOT_FOUND`. Measured on Windows 10 22H2 with the real calls on a scratch folder: 3 for all four calls on `missing\x.txt`, `missing\deeper\x.txt` and `file.txt\x.txt`, 2 for `nope.txt`. `CreateDirectory`, `CopyFile`, the write opens and `FindFirstFile` already make that split here. The four calls now pick the error with the same `is_folder(parent_of(parts))` test the others use, so a folder the title removed counts as missing too. One existing check expected `ERROR_FILE_NOT_FOUND` for `DeleteFileW(GAME:\nope\missing.txt)`, where `nope` doesn't exist; it now expects `ERROR_PATH_NOT_FOUND`, the host's answer. One sentence in `docs/runtime_imports.md`. Same change as `#7316`, on top of current `main` (`d083a2c`); the only conflict was `main` renaming `join` to `disk_path` on the `MoveFile` line. ### Tested Windows 10 22H2 (19045), RTX 2060 / NVIDIA 566.14, Ryzen 5 2600X, clang-cl 23.1.6 + lld-link, MSVC 14.44 STL, Windows SDK 10.0.26100, Ninja: - This head's tree: ctest `file_system` passes. - On `#7316` (`b9c590fd2`): `file_system_test` 457 checks OK; with `main`'s `file_system.cpp` it failed 9 (the 8 new path-not-found checks and the updated one). - Outside checks on `#7316`: [review](https://github.com/ProjectLeonida/Leonida/pull/7316#issuecomment-7107256039), [Windows (MSVC)](https://github.com/ProjectLeonida/Leonida/pull/7316#issuecomment-7107278183), [RTX 5090](https://github.com/ProjectLeonida/Leonida/pull/7316#issuecomment-7107480391), [RTX 4070](https://github.com/ProjectLeonida/Leonida/pull/7316#issuecomment-7108931506). No game files. AI-assisted (Claude Code). ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (no translator change) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:30 +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#323
No description provided.