aboutsummaryrefslogtreecommitdiff
path: root/src/WriteScalar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/WriteScalar.c')
-rw-r--r--src/WriteScalar.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/WriteScalar.c b/src/WriteScalar.c
index 02e64b8..f0ad792 100644
--- a/src/WriteScalar.c
+++ b/src/WriteScalar.c
@@ -16,7 +16,6 @@
#include "cctk.h"
#include "cctk_Parameters.h"
-#include "CactusBase/IOUtil/src/ioGH.h"
#include "CactusBase/IOUtil/src/ioutil_AdvertisedFiles.h"
#include "iobasicGH.h"
@@ -367,16 +366,14 @@ static FILE *OpenScalarFile (const cGH *GH,
int first_time_through;
FILE *file;
iobasicGH *myGH;
- const ioGH *ioUtilGH;
char *fullname;
char comment_char, buffer[128];
ioAdvertisedFileDesc advertised_file;
DECLARE_CCTK_PARAMETERS
- /* get the GH extension handles for IOUtil and IOBasic */
+ /* get the GH extension handle for IOBasic */
myGH = CCTK_GHExtension (GH, "IOBasic");
- ioUtilGH = CCTK_GHExtension (GH, "IO");
/* get the variable's full name */
fullname = CCTK_FullName (vindex);
@@ -385,7 +382,7 @@ static FILE *OpenScalarFile (const cGH *GH,
If restart from recovery, existing files are opened in append mode. */
first_time_through = GetNamedData (myGH->filenameListScalar, filename)==NULL;
file = fopen (filename,
- ioUtilGH->recovered || ! first_time_through ? "a" : "w");
+ IO_TruncateOutputFiles (GH) && first_time_through ? "w" : "a");
if (! file)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,