Merge pull request 're-assign active file on file corruption when necessary' (#688) from reassign-active-file-on-corruption into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #688 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
commit
2c17aff124
@ -268,6 +268,10 @@ ReturnValue_t PersistentTmStore::getNextDumpPacket(PusTmReader& reader, bool& fi
|
||||
// restore the file dump, but for now do not trust the file.
|
||||
std::error_code e;
|
||||
std::filesystem::remove(dumpParams.dirEntry.path().c_str(), e);
|
||||
if(dumpParams.dirEntry.path() == activeFile) {
|
||||
activeFile == std::nullopt;
|
||||
assignAndOrCreateMostRecentFile();
|
||||
}
|
||||
fileHasSwapped = true;
|
||||
return loadNextDumpFile();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user