From 3f5fc698284c5fee0e46b1b3b15a8c74325ac1fe Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 01:50:44 +0100 Subject: Autosave now generates new files. --- tsalis/src/tsalis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tsalis') diff --git a/tsalis/src/tsalis.c b/tsalis/src/tsalis.c index 81c9a3d..6840a02 100644 --- a/tsalis/src/tsalis.c +++ b/tsalis/src/tsalis.c @@ -87,7 +87,9 @@ exec(void) s_cycle(); if (g_autoSaveInterval && !(s_getCycle() % g_autoSaveInterval)) { - s_save(g_simName); + char extendedName[NAME_MAX_SIZE + 28]; + sprintf(extendedName, "%s.%010u.%010u.auto", g_simName, s_getEpoch(), s_getCycle()); + s_save(extendedName); } end = clock(); -- cgit v1.2.1