diff --git a/slsReceiverSoftware/src/Implementation.cpp b/slsReceiverSoftware/src/Implementation.cpp index dbacf6eaf..bcfa24611 100644 --- a/slsReceiverSoftware/src/Implementation.cpp +++ b/slsReceiverSoftware/src/Implementation.cpp @@ -919,7 +919,12 @@ void Implementation::CreateUDPSockets() { } void Implementation::SetupWriter() { + try { + //check if filePath empty and throw error + if(filePath.empty()){ + throw ReceiverError("File path cannot be empty"); + } // check if folder exists and throw if it cant create mkdir_p(filePath); // create first files diff --git a/slsReceiverSoftware/src/Implementation.h b/slsReceiverSoftware/src/Implementation.h index d32b491ea..0a4141af9 100644 --- a/slsReceiverSoftware/src/Implementation.h +++ b/slsReceiverSoftware/src/Implementation.h @@ -314,7 +314,7 @@ class Implementation : private virtual slsDetectorDefs { // file parameters fileFormat fileFormatType{BINARY}; - std::string filePath{"/"}; + std::string filePath{}; std::string fileName{"run"}; uint64_t fileIndex{0}; bool fileWriteEnable{false};