fix: Coreprocess will attempt to create a daemon log before returning the path if it does not exist

This commit is contained in:
sithlord48 2026-01-09 15:50:58 -05:00 committed by Nick Bolton
parent cab33df72d
commit 2da14c3da3

View file

@ -530,9 +530,13 @@ QString CoreProcess::requestDaemonLogPath()
return QString(); return QString();
} }
if (QFileInfo logFile(logPath); !logFile.exists() || !logFile.isFile()) { if (QFileInfo logFile(logPath); !logFile.isFile()) {
qWarning() << "daemon log path file does not exist:" << logPath; auto file = QFile(logPath);
return QString(); if (!file.open(QFile::ReadWrite)) {
qCritical() << "daemon log path file can not be written:" << logPath;
return QString();
}
file.write(""); // Create an empty file
} }
return logPath; return logPath;