Sfoglia il codice sorgente

Truncate log file on open

Eric Helgeson 4 anni fa
parent
commit
09a79fccae
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/BlueSCSI.cpp

+ 1 - 1
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);