refactor: Log Error stop the core process if unable to write to the required fingerprint database

This commit is contained in:
sithlord48 2025-05-22 09:41:00 -04:00 committed by Nick Bolton
parent 767919b342
commit 929131d10b

View file

@ -811,7 +811,11 @@ void MainWindow::checkFingerprint(const QString &line)
if (fingerprintDialog.exec() == QDialog::Accepted) {
db.addTrusted(sha256);
db.write(trustedFingerprintDatabase());
if (!db.write(trustedFingerprintDatabase())) {
qCritical().noquote() << "unable to write fingerprint to db:" << trustedFingerprintDatabase();
m_coreProcess.stop();
return;
}
if (isClient) {
m_checkedServers.removeAll(sha256Text);
m_coreProcess.start();