diff options
author | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2000-04-28 11:18:36 +0000 |
---|---|---|
committer | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2000-04-28 11:18:36 +0000 |
commit | 1e81d091960f8b18ee549f76cbda5b25be8ea386 (patch) | |
tree | 751cdafc7c240b5616ce137356ce451306f473fe | |
parent | 51793064efd7db51590de329f2201d6e55bb0243 (diff) |
Give level 2 warning if output dir already exists, level 1 warning if it
couldn't be created.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@55 b589c3ab-70e8-4b4d-a09f-cba2dd200880
-rw-r--r-- | src/GHExtension.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c index aca1cb1..6975cea 100644 --- a/src/GHExtension.c +++ b/src/GHExtension.c @@ -71,7 +71,15 @@ int IOBasic_InitGH (cGH *GH) /* create the output dir */ if (CCTK_MyProc (GH) == 0) - CCTK_mkdir (myGH->outdirScalar); + { + i = CCTK_mkdir (myGH->outdirScalar); + if (i < 0) + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Problem creating Scalar output directory '%s'", myGH->outdirScalar); + if (i > 0) + CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, + "Scalar output directory '%s' already exists", myGH->outdirScalar); + } for (i=0; i<CCTK_NumVars(); i++) myGH->outScalar_last[i] = -1; |