writer: the temporary file name is defined when the arm date is missing
tmp_suffix was left uninitialised and only assigned inside the `if (!arm_date.empty())` body or in the catch handler. An empty arm_date takes neither path, so the `.tmp` file name was formatted from an indeterminate value. Initialise it to the same wall-clock fallback the catch handler already uses. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011GxZqDiFP3KqriBhNdcR56
This commit is contained in:
1 parent
7dc749fb31
commit
94c5437885
2 files changed
+2
-2
No files matched your search
@@ -45,7 +45,7 @@ declared_pixel_signed(msg.pixel_signed) {
|
||||
exptime.reserve(images_per_file);
|
||||
number.reserve(images_per_file);
|
||||
|
||||
uint64_t tmp_suffix;
|
||||
uint64_t tmp_suffix = std::chrono::system_clock::now().time_since_epoch().count();
|
||||
try {
|
||||
if (!msg.arm_date.empty())
|
||||
tmp_suffix = parse_UTC_to_ms(msg.arm_date);
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ std::string HDF5Metadata::MasterFileName(const StartMessage &start) {
|
||||
NXmx::NXmx(const StartMessage &start)
|
||||
: start_message(start),
|
||||
filename(HDF5Metadata::MasterFileName(start)) {
|
||||
uint64_t tmp_suffix;
|
||||
uint64_t tmp_suffix = std::chrono::system_clock::now().time_since_epoch().count();
|
||||
try {
|
||||
if (!start.arm_date.empty())
|
||||
tmp_suffix = parse_UTC_to_ms(start.arm_date);
|
||||
|
||||
Reference in new issue
Block a user