From d070455f0104d1664713925483256cd5f9524598 Mon Sep 17 00:00:00 2001 From: Hayden McAlister Date: Wed, 3 May 2023 15:03:24 +1200 Subject: [PATCH] Update main to actually remove the data directory before simulation --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index cdb8dc1..c635655 100644 --- a/main.go +++ b/main.go @@ -89,6 +89,9 @@ func init() { // Remove old data directory and recreate logger.Printf("Creating data directory %#v\n", *dataDirectory) + if err := os.RemoveAll(*dataDirectory); err != nil { + panic(err) + } os.MkdirAll(*dataDirectory, 0700) // Set up data collector to handle events during this trial