XGameSave: a container's last-modified time stops changing after its first save #1041
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#1041
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?
@Conrage on GitHub · 2026-11-24 10:48 UTC · original
each_containerreportslastModifiedTimeas the container folder's own modified time:github.com/ivall/xcl@6efdabc/crates/xcl/src/hle/xgameruntime/gamesave.rs (L340-L344)A folder's modified time changes only when an entry directly inside it is created, renamed or removed. The container folder holds just
b\anddisplay, and blob writes and deletes happen insideb\(apply, L564-L590). So:b\and the time changes;XGameSaveCreateUpdate(c, nullptr, …), which the module's own tests use) only changesb\, so the container's time stays at the first save;displayin the container folder, so the time does change then.Titles show this time in their load/save menus and use it to pick the newest slot ("continue"). Under XCL, a slot saved again later can look older than one saved once.
Repro (folder behaviour, any OS): make
c\b\, set both folders' times to the past, writec\b\tmpand rename it toc\b\blob:c\b\gets the current time,c\keeps the old one. NTFS updates a folder's last-write time the same way.Expected:
lastModifiedTimeis the time of the container's last submitted update.Suggested fix: take the newest modified time of
b\,displayand the blob files, or touch the container folder at the end ofapply.Not tested: found by reading the code; the folder behaviour was checked on Linux, not run on Windows or with a title.
AI use: found, checked and written up by Claude Code (Claude Opus 5.5) at my request.
github-bot referenced this issue2026-11-26 04:41:49 +00:00