filename fixes scex
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
#include <fstream>
|
||||
#include <utility>
|
||||
|
||||
#include "eive/definitions.h"
|
||||
#include "fsfw/ipc/CommandMessage.h"
|
||||
#include "fsfw/ipc/QueueFactory.h"
|
||||
#include "fsfw/tmstorage/TmStoreMessage.h"
|
||||
@ -289,7 +290,7 @@ ReturnValue_t PersistentTmStore::pathToTime(const std::filesystem::path& path, s
|
||||
auto pathStr = path.string();
|
||||
size_t splitChar = pathStr.find('_');
|
||||
auto timeOnlyStr = pathStr.substr(splitChar + 1);
|
||||
if (nullptr == strptime(timeOnlyStr.c_str(), FILE_DATE_FORMAT, &time)) {
|
||||
if (nullptr == strptime(timeOnlyStr.c_str(), config::FILE_DATE_FORMAT, &time)) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
@ -306,7 +307,7 @@ ReturnValue_t PersistentTmStore::createMostRecentFile(std::optional<uint8_t> suf
|
||||
time_t epoch = currentTv.tv_sec;
|
||||
struct tm* time = gmtime(&epoch);
|
||||
size_t writtenBytes = strftime(reinterpret_cast<char*>(fileBuf.data() + currentIdx),
|
||||
fileBuf.size(), FILE_DATE_FORMAT, time);
|
||||
fileBuf.size(), config::FILE_DATE_FORMAT, time);
|
||||
if (writtenBytes == 0) {
|
||||
sif::error << "PersistentTmStore::createMostRecentFile: Could not create file timestamp"
|
||||
<< std::endl;
|
||||
|
@ -85,8 +85,6 @@ class PersistentTmStore : public TmStoreFrontendSimpleIF, public SystemObject {
|
||||
private:
|
||||
static constexpr uint8_t MAX_FILES_IN_ONE_SECOND = 10;
|
||||
static constexpr size_t MAX_FILESIZE = 8192;
|
||||
// ISO8601 timestamp.
|
||||
static constexpr char FILE_DATE_FORMAT[] = "%FT%H%M%SZ";
|
||||
|
||||
//! [EXPORT] : [SKIP]
|
||||
static constexpr ReturnValue_t INVALID_FILE_DETECTED_AND_DELETED = returnvalue::makeCode(2, 1);
|
||||
|
Reference in New Issue
Block a user