modify oss to append at end
This commit is contained in:
@ -154,9 +154,10 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
||||
ReturnValue_t status = RETURN_OK;
|
||||
auto oneFileHandler = [&](std::string cmdName) {
|
||||
fileId = random_string(6);
|
||||
std::ostringstream oss("/tmp/scex-");
|
||||
std::ostringstream oss("/tmp/scex-", std::ostringstream::ate);
|
||||
oss << cmdName << fileId << ".bin";
|
||||
fileName = oss.str();
|
||||
std::cout << fileName << std::endl;
|
||||
ofstream out(fileName, ofstream::binary);
|
||||
if (out.bad()) {
|
||||
sif::error << "ScexDeviceHandler::interpretDeviceReply: Could not open file " << fileName
|
||||
@ -172,7 +173,7 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
||||
if ((helper.getPacketCounter() == 1) or (not fileNameSet)) {
|
||||
|
||||
fileId = random_string(6);
|
||||
std::ostringstream oss("/tmp/scex-");
|
||||
std::ostringstream oss("/tmp/scex-", std::ostringstream::ate);
|
||||
oss << cmdName << fileId << ".bin";
|
||||
fileName = oss.str();
|
||||
fileNameSet = true;
|
||||
|
Reference in New Issue
Block a user