From 09a79fccae1ae664f756d086cd2a51bce9ef3f17 Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Thu, 8 Jul 2021 10:03:07 -0500 Subject: [PATCH] Truncate log file on open --- src/BlueSCSI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BlueSCSI.cpp b/src/BlueSCSI.cpp index 2a082fd..4eab544 100644 --- a/src/BlueSCSI.cpp +++ b/src/BlueSCSI.cpp @@ -515,7 +515,7 @@ void setup() * Setup initialization logfile */ void initFileLog() { - LOG_FILE = SD.open(LOG_FILENAME, O_WRONLY | O_CREAT); + LOG_FILE = SD.open(LOG_FILENAME, O_WRONLY | O_CREAT | O_TRUNC); LOG_FILE.println("BlueSCSI <-> SD - https://github.com/erichelgeson/BlueSCSI"); LOG_FILE.print("VERSION: "); LOG_FILE.println(VERSION);