protonscr

Savegame timestamps use access time, not modification time

steamclosed Feature RequestreviewedMOVED: Half-Life 1
ValveSoftware/steam-for-linux#1337 · opened 2013-02-06 by johndrinkwater · updated 2017-12-31 · 4 comments · github
Jjohndrinkwater 2013-02-06 github

After the latest update, save-game location moved so I dutifully mv all my files to the new location, but now Half-Life doesn’t know how to sort them, as
save game timestamps appear to use access time, not modification time.

http://steamcommunity.com/sharedfiles/filedetails/?id=125467450
vs

-rw-rw-r--  1 john john  189581 2013-01-31 01:02 Half-Life-121.sav
-rw-rw-r--  1 john john  185721 2013-01-31 01:02 Half-Life-122.sav
-rw-rw-r--  1 john john  185608 2013-01-31 23:17 Half-Life-123.sav
-rw-rw-r--  1 john john  319276 2013-01-31 23:27 Half-Life-124.sav
Aalfred-valve maintainer 2013-02-07 github

dupe of #966, but it better describes it than #966 so I will close that one.

Aalfred-valve maintainer 2013-02-07 github

I looked over the code, we use mtime from the stat() call. For autosave and quicksaves the way we age saves means that timestamps on both will always be the same (we move from one file to another, which AFAIK changes mtime). So I think this is DNF, we use file mod times and it mostly works. A feature request would be to embed the save time in the save file itself, but that would break older saves and is not worth the effort compared to the issue.

Jjohndrinkwater 2013-02-07 github

Hmm, that is odd as my screenshot shows access time

john@joran ~/Steam/SteamApps/common/Half-Life/valve/SAVE > ls -lar --time=u *-00[0-3].sav
-rw-rw-r-- 1 john john 1906710 2013-02-06 22:48 Half-Life-003.sav
-rw-rw-r-- 1 john john 1829784 2013-02-06 22:48 Half-Life-002.sav
-rw-rw-r-- 1 john john 1835141 2013-02-06 22:48 Half-Life-001.sav
-rw-rw-r-- 1 john john 1567522 2013-02-06 22:48 Half-Life-000.sav

rather than mtime (which is the default for ls)

john@joran ~/Steam/SteamApps/common/Half-Life/valve/SAVE > ls -lar *-00[0-3].sav
-rw-rw-r-- 1 john john 1906710 2013-01-25 02:24 Half-Life-003.sav
-rw-rw-r-- 1 john john 1829784 2013-01-25 02:19 Half-Life-002.sav
-rw-rw-r-- 1 john john 1835141 2013-01-25 01:25 Half-Life-001.sav
-rw-rw-r-- 1 john john 1567522 2013-01-24 23:45 Half-Life-000.sav
Jjvasileff 2017-12-31 github

I looked over the code, we use mtime from the stat() call

It's actually using the greater of mtime and ctime (at least on macOS), making it impossible to correct times for older saves after a restore or sync.

Nothing extracted yet.