MAX IV test day 1 modifications
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// Copyright (2019-2023) Paul Scherrer Institute
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <filesystem>
|
||||
|
||||
#include "HDF5DataFile.h"
|
||||
#include "../compression/JFJochCompressor.h"
|
||||
|
||||
@@ -50,7 +52,9 @@ std::optional<HDF5DataFileStatistics> HDF5DataFile::Close() {
|
||||
data_set.reset();
|
||||
}
|
||||
data_file.reset();
|
||||
std::rename(tmp_filename.c_str(), filename.c_str());
|
||||
|
||||
if (!std::filesystem::exists(filename.c_str()))
|
||||
std::rename(tmp_filename.c_str(), filename.c_str());
|
||||
|
||||
closed = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user