XGameSave: a container's last-modified time stops changing after its first save #1034
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?
Imported from ivall/xcl. Originally posted by Conrage on 2026-11-24T10:48:00Z.
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.
upstream-sync referenced this issue2026-11-24 13:02:56 +00:00
upstream-sync referenced this issue2026-11-24 23:06:49 +00:00