aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorknarf <knarf@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2012-01-11 21:44:26 +0000
committerknarf <knarf@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2012-01-11 21:44:26 +0000
commit76e00e89876cc82865e52f7fa7c01f5914366c50 (patch)
treeba63df370999df489f92da8fd20ae0a24aa76544 /src
parentea1ca471ae4b1b430ee85eb765a3c5dc77b8de9a (diff)
make checkpoint_dir steerable. This requires the checkpoint_dir to be created not only at startup, and the only point in which this can be helped with in this thorn is in IOUtil_AssembleFilename() which is called by using thorns to get the file name of the checkpoint - this is repeated there now
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@286 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
Diffstat (limited to 'src')
-rw-r--r--src/CheckpointRecovery.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c
index 2101857..0c27a7f 100644
--- a/src/CheckpointRecovery.c
+++ b/src/CheckpointRecovery.c
@@ -209,11 +209,19 @@ char *IOUtil_AssembleFilename (const cGH *GH,
case CP_INITIAL_DATA:
dir = checkpoint_dir;
basename = checkpoint_ID_file;
+ if (CCTK_CreateDirectory(0755, checkpoint_dir) < 0)
+ CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Checkpoint directory %s could not be created",
+ checkpoint_dir);
break;
case CP_EVOLUTION_DATA:
dir = checkpoint_dir;
basename = checkpoint_file;
+ if (CCTK_CreateDirectory(0755, checkpoint_dir) < 0)
+ CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Checkpoint directory %s could not be created",
+ checkpoint_dir);
break;
case CP_RECOVER_DATA: