Gui: Check return value

Coverity issue 513113
This commit is contained in:
Chris Hennes
2025-03-22 22:19:11 -05:00
committed by Benjamin Nauck
parent 44e15af433
commit f534d47700

View File

@@ -83,7 +83,9 @@ void AutoSaver::renameFile(QString dirName, QString file, QString tmpFile)
<< " -> " << file.toUtf8().constData());
QDir dir(dirName);
dir.remove(file);
dir.rename(tmpFile,file);
if (!dir.rename(tmpFile,file)) {
FC_ERR("Failed to rename autosave file " << tmpFile.toStdString() << " to " << file.toStdString() << "\n");
}
}
void AutoSaver::setTimeout(int ms)