mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1175
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1141
Author: @TimIdle
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:oldpr-9880-gamesave-quota📝 Commits (2)
2ad0bd5xgameruntime_gamesave: prevent uint64_t quota underflow in commit() on case-colliding blobs0b23aa4xgameruntime_gamesave: a blob name differing only in case is the same blob📊 Changes
2 files changed (+100 additions, -6 deletions)
View changed files
📝
runtime/shims/xgameruntime_gamesave.cpp(+38 -6)📝
runtime/test/xgameruntime_gamesave_test.cpp(+62 -0)📄 Description
Claimed in the coordination issue as: OLD-9880 (claim)
What and why
This carries forward
old-pr/9880by @ChalanaGimhanaX (draft #147). Their commit is cherry-picked ontomainwith the author kept, and rebased over #992. A second commit by me covers what #992 changed.encode_namekeeps ASCII letters as they are, so the blobsstoryandSTORYare the same file on NTFS.commit()subtracted the existing file's size once per name. An update that names that file twice subtracted it twice, theuint64_ttotal wrapped, and a small delete failed withE_GS_QUOTA_EXCEEDED.The fix subtracts each on-disk file once (
fs::equivalent), clamps the subtraction at 0 and saturates the addition.#992 then gave
commit()a rollback path. With both names in one update, the second name's backup fails after the first was applied, and the update returnsE_GS_OUT_OF_LOCAL_STORAGE. So the second commit makesXGameSaveSubmitBlobWriteandXGameSaveSubmitBlobDeleterefuse a name that differs from one already in the update only in case, withE_INVALIDARG, as they already refuse an exact duplicate. The case-alias checks now expect that refusal. They compare the remaining quota with its value before the seed, because the rollback checks of #992 leave their container behind.Tested
Native Windows 11 10.0.26300 (NTFS), MSVC 19.44, RelWithDebInfo, on
main364ab4eplus the two commits.xgameruntime_gamesave_testwith both commitsxgameruntime_gamesave_testwithmain'sxgameruntime_gamesave.cppFAIL a delete of "STORY" after one of "story" in the same update is refused as the same blobxgameruntime_gamesave_testwith only the first commit'sxgameruntime_gamesave.cppctest -j 6gameinputdisabled.Not covered: a name is still kept in the case it was first written in. Whether names should be case-folded on disk is a separate question.
GPUs tested: n/a (no GPU code)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (No translator rule here.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.