Skip to content

file_system: a GAME: name inside a missing folder fails with ERROR_PATH_NOT_FOUND, as on the host - #271

Closed
Andretuta wants to merge 1 commit into
mainfrom
old-pr/10004
Closed

Andretuta wants to merge 1 commit into
mainfrom
old-pr/10004

Conversation

@Andretuta

Copy link
Copy Markdown
Collaborator

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)

…TH_NOT_FOUND, as on the host

Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
@aslan2142

Copy link
Copy Markdown
Collaborator

Closing: everything this pull request changes is already in main. Merging it into main (490f5b9ec) leaves every file as it is. The same change landed with #760.

Thanks for the work! If something here is still missing from main, open a new pull request with what's left.

AI-assisted (Claude Code, Claude Opus 5.5).

@aslan2142 aslan2142 closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants