From 2258a4ca88ff3020c9456c1aa90797bfe5b536fc Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 13 Feb 2006 13:12:51 +0000 Subject: Auto-recovery from an unchunked checkpoint file got broken in my last commit. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@237 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a --- src/CheckpointRecovery.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c index 786c9fc..a0563ef 100644 --- a/src/CheckpointRecovery.c +++ b/src/CheckpointRecovery.c @@ -619,26 +619,23 @@ int IOUtil_RecoverParameters (int (*recover_fn) (cGH *GH, break; } } - if (*p != '.') - { - continue; - } /* check for a '.file_' suffix for chunked output */ - if (! strncmp (p, ".file_", 6)) + q = p; + if (! strncmp (q, ".file_", 6)) { - continue; - } - - /* read past the number and check the file extension suffix */ - for (q = p + 6; *q && *q != '.'; q++) - { - if (! isdigit ((int) *q)) + /* read past the number */ + for (q = q + 6; *q && *q != '.'; q++) { - break; + if (! isdigit ((int) *q)) + { + break; + } } } - if (*q != '.' || strcmp (q + 1, fileExtension)) + + /* finally check the file extension suffix */ + if (*q != '.' || strcmp (q, fileExtension)) { continue; } -- cgit v1.2.3