diff --git a/src/libdramsys/DRAMSys/common/TlmRecorder.cpp b/src/libdramsys/DRAMSys/common/TlmRecorder.cpp index 2e09467f..bf56770e 100644 --- a/src/libdramsys/DRAMSys/common/TlmRecorder.cpp +++ b/src/libdramsys/DRAMSys/common/TlmRecorder.cpp @@ -43,6 +43,7 @@ #include "DRAMSys/common/DebugManager.h" +#include #include #include @@ -356,14 +357,7 @@ void TlmRecorder::commitRecordedDataToDB() void TlmRecorder::openDB(const std::string& dbName) { - std::ifstream f(dbName.c_str()); - if (f.good()) - { - if (remove(dbName.c_str()) != 0) - { - SC_REPORT_FATAL("TlmRecorder", "Error deleting file"); - } - } + std::filesystem::remove(dbName.c_str()); if (sqlite3_open(dbName.c_str(), &db) != SQLITE_OK) {