Re #1567: writeBackup(): added PID to temporary file name
This commit is contained in:
@@ -1172,12 +1172,12 @@ void MainWindow::writeBackup()
|
|||||||
}
|
}
|
||||||
int oldrev = getEpromVersion(fileName);
|
int oldrev = getEpromVersion(fileName);
|
||||||
QString tempDir = QDir::tempPath();
|
QString tempDir = QDir::tempPath();
|
||||||
QString tempFlash = tempDir + "/flash.bin";
|
QString tempFlash = tempDir + QString("/flash-%1.bin").arg(QCoreApplication::applicationPid());
|
||||||
|
|
||||||
if (!readFirmwareFromRadio(tempFlash))
|
if (!readFirmwareFromRadio(tempFlash))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QString restoreFile = tempDir + "/compat.bin";
|
QString restoreFile = tempDir + QString("/compat.bin-%1.bin").arg(QCoreApplication::applicationPid());
|
||||||
if (!convertEEPROM(fileName, restoreFile, tempFlash)) {
|
if (!convertEEPROM(fileName, restoreFile, tempFlash)) {
|
||||||
int ret = QMessageBox::question(this, "Error", tr("Cannot check Models and Settings compatibility! Continue anyway?") ,
|
int ret = QMessageBox::question(this, "Error", tr("Cannot check Models and Settings compatibility! Continue anyway?") ,
|
||||||
QMessageBox::Yes | QMessageBox::No);
|
QMessageBox::Yes | QMessageBox::No);
|
||||||
@@ -1194,9 +1194,7 @@ void MainWindow::writeBackup()
|
|||||||
}
|
}
|
||||||
fileName = restoreFile;
|
fileName = restoreFile;
|
||||||
}
|
}
|
||||||
QByteArray ba = tempFlash.toLatin1();
|
unlink(tempFlash.toAscii());
|
||||||
char *name = ba.data();
|
|
||||||
unlink(name);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (backupEnable) {
|
if (backupEnable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user