From 175c0f9961084e291b8465094e8b0fb42caf77d8 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 23 Mar 2023 20:56:06 +0100 Subject: [PATCH] and another bug --- mission/tmtc/PersistentTmStore.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mission/tmtc/PersistentTmStore.cpp b/mission/tmtc/PersistentTmStore.cpp index 8905aff4..6cbcac86 100644 --- a/mission/tmtc/PersistentTmStore.cpp +++ b/mission/tmtc/PersistentTmStore.cpp @@ -243,14 +243,12 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() { static_cast(dumpParams.fileSize)); // Increment iterator for next cycle. dumpParams.dirIter++; - break; + return returnvalue::OK; } } - if (dumpParams.dirIter == directory_iterator()) { - state = State::IDLE; - return DUMP_DONE; - } - return returnvalue::OK; + // Directory iterator was consumed and we are done. + state = State::IDLE; + return DUMP_DONE; } ReturnValue_t PersistentTmStore::dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen,