aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Startup.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Startup.c b/src/Startup.c
index da5703a..405a110 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -144,7 +144,15 @@ static void *IOHDF5_SetupGH (tFleshConfig *config,
If so take this directory otherwise default to "IO::outdir" */
if (CCTK_ParameterQueryTimesSet ("outdir_HDF5", CCTK_THORNSTRING) > 0)
{
- myGH->outdir = strdup (outdir_HDF5);
+ if (CCTK_Equals (out3D_mode, "onefile") || ! strstr (outdir_HDF5, "%u"))
+ {
+ myGH->outdir = strdup (outdir_HDF5);
+ }
+ else
+ {
+ myGH->outdir = (char *) malloc (strlen (outdir_HDF5) + 20);
+ sprintf (myGH->outdir, outdir_HDF5, CCTK_MyProc (GH));
+ }
}
else
{