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();
}
if (QFileInfo logFile(logPath); !logFile.exists() || !logFile.isFile()) {
qWarning() << "daemon log path file does not exist:" << logPath;
return QString();
if (QFileInfo logFile(logPath); !logFile.isFile()) {
auto file = QFile(logPath);
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;