扫描仪维护工具,升级固件后删除升级文件

This commit is contained in:
luoliangyi 2022-11-29 15:09:06 +08:00
parent 423d8dc7fc
commit de1121ca5c
1 changed files with 4 additions and 2 deletions

View File

@ -410,10 +410,10 @@ void MainWindow::on_btnDownloadUpgrade_clicked()
HGBase_GetFileSuffix(url.toStdString().c_str(), suffix, 64); HGBase_GetFileSuffix(url.toStdString().c_str(), suffix, 64);
HGChar savePath[512]; HGChar savePath[512];
HGBase_GetConfigPath(savePath, 512); HGBase_GetTmpPath(savePath, 512);
HGBase_CreateDir(savePath); HGBase_CreateDir(savePath);
HGChar fileName[128]; HGChar fileName[128];
sprintf(fileName, "%s.%s", versionNum.toStdString().c_str(), suffix); sprintf(fileName, "%s.%s", "{644759d6-7e4e-47c7-b42e-5105bb2de4a3}", suffix);
strcat(savePath, fileName); strcat(savePath, fileName);
QFile saveFile(savePath); QFile saveFile(savePath);
@ -468,6 +468,8 @@ void MainWindow::on_btnDownloadUpgrade_clicked()
ui->labelDevInfo->setText(QString(tr("device: %1 upgrade firmware failed, io error")).arg(m_curDevName)); ui->labelDevInfo->setText(QString(tr("device: %1 upgrade firmware failed, io error")).arg(m_curDevName));
} }
} }
HGBase_DeleteFile(savePath);
} }
} }