aboutsummaryrefslogtreecommitdiff
path: root/src/CheckpointRecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/CheckpointRecovery.c')
-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: