diff --git a/DeviceConnection.cpp b/DeviceConnection.cpp index 182fe46..ff0b450 100644 --- a/DeviceConnection.cpp +++ b/DeviceConnection.cpp @@ -453,7 +453,11 @@ void DeviceConnection::requestOta(const QString &firmware, const QString &file) Task task; task.command = "a22devicefirmware_setdata"; task.task = [this, file, firmware]() { +#ifdef Q_OS_LINUX + std::ifstream ifs(file.toStdString(), std::ifstream::binary); +#else std::ifstream ifs(Amass::StringUtility::UTF8ToGBK(file.toStdString()), std::ifstream::binary); +#endif m_uploadBuffer = std::vector((std::istreambuf_iterator(ifs)), std::istreambuf_iterator()); m_sendedSize = 0;