From b1bc549ab6a45b1150b87136ba7a0ccbbf308b9f Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Thu, 22 Oct 2020 18:50:54 +0200
Subject: [PATCH] Do not write a final snapshot, VELOCIraptor output or
 statistics file when running a fixed number of steps

---
 examples/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/main.c b/examples/main.c
index 38e706be84..927d779012 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -1603,7 +1603,7 @@ int main(int argc, char *argv[]) {
   }
 
   /* Write final output. */
-  if (!force_stop) {
+  if (!force_stop && nsteps == 0) {
 
     /* Move forward in time */
     e.ti_old = e.ti_current;
-- 
GitLab