This commit is contained in:
maliakal_d 2021-07-02 10:10:46 +02:00
parent 4422ce61aa
commit 0e4fd598b1
2 changed files with 4 additions and 6 deletions

View File

@ -23,12 +23,9 @@ void BinaryMasterFile::CreateMasterFile(const std::string filePath,
os << filePath << "/" << fileNamePrefix << "_master"
<< "_" << fileIndex << ".raw";
fileName_ = os.str();
if (!(silentMode)) {
LOG(logINFO) << "Master File: " << fileName_;
}
// create file
if (!(overWriteEnable)) {
if (!overWriteEnable) {
if (nullptr == (fd_ = fopen((const char *)fileName_.c_str(), "wx"))) {
fd_ = nullptr;
throw sls::RuntimeError("Could not create binary master file " +
@ -39,7 +36,9 @@ void BinaryMasterFile::CreateMasterFile(const std::string filePath,
throw sls::RuntimeError(
"Could not create/overwrite binary master file " + fileName_);
}
if (!silentMode) {
LOG(logINFO) << "Master File: " << fileName_;
}
attr->WriteMasterBinaryAttributes(fd_);
CloseFile();
}

View File

@ -723,7 +723,6 @@ void Implementation::SetupWriter() {
// master file
std::unique_ptr<MasterAttributes> masterAttributes;
if (masterFileWriteEnable && modulePos == 0) {
std::unique_ptr<MasterAttributes> masterAttributes;
switch (detType) {
case GOTTHARD:
masterAttributes = sls::make_unique<GotthardMasterAttributes>();