diff --git a/update.cpp b/update.cpp index 9ab08d3..60b38ee 100644 --- a/update.cpp +++ b/update.cpp @@ -787,15 +787,10 @@ bool Update::doUpdate() { } else { // TODO } - char buf[128]; - memset(buf, 0x00, sizeof(buf)); - snprintf(buf, sizeof(buf)-1, "DONE, %*.*s, %*.*s, %*.*s\n", - 35, 35, name.toStdString().c_str(), - 20, 20, QDateTime::currentDateTime().toString(Qt::ISODate).toStdString().c_str(), - 10, 10, (res == true) ? "SUCCESS" : "ERROR"); - m_update_ctrl_file_copy.write(buf); - - qInfo() << "write" << buf << "into file" << m_update_ctrl_file_copy; + out << "DONE, " << name << ", " + << QDateTime::currentDateTime().toString(Qt::ISODate) << ", " + << ((res == true) ? "SUCCESS" : "ERROR") << "\n"; + out.flush(); } // for (it = openLines.cbegin(); it != openLines.end(); ++it) {