correction for prefix handling on Q7S
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-02-22 18:06:34 +01:00
parent 9633359db3
commit 90c1d45f20
19 changed files with 66 additions and 30 deletions

View File

@ -52,7 +52,7 @@ ReturnValue_t PersistentTmStore::assignAndOrCreateMostRecentFile() {
time_t fileEpoch = timegm(&time);
// There is still a file within the active time window, so re-use that file for new TMs to
// store.
if (fileEpoch + rolloverDiffSeconds > currentTv.tv_sec) {
if (fileEpoch + static_cast<time_t>(rolloverDiffSeconds) > currentTv.tv_sec) {
activeFileTv.tv_sec = fileEpoch;
activeFile = file.path();
break;
@ -191,14 +191,18 @@ void PersistentTmStore::calcDiffSeconds(RolloverInterval intervalUnit, uint32_t
}
}
void PersistentTmStore::updateBaseDir() {
bool PersistentTmStore::updateBaseDir() {
using namespace std::filesystem;
std::string currentPrefix = sdcMan.getCurrentMountPrefix();
const char* currentPrefix = sdcMan.getCurrentMountPrefix();
if (currentPrefix == nullptr) {
return false;
}
basePath = path(currentPrefix) / baseDir / baseName;
if (not exists(basePath)) {
create_directories(basePath);
}
baseDirUninitialized = false;
return true;
}
void PersistentTmStore::addApid(uint16_t apid) {