Skip to content

Commit

Permalink
fix: isFileExist DBus interface return value handling logic
Browse files Browse the repository at this point in the history
DBus interface returns QString type, but the frontend receives it as bool, causing continuous error logic.

Log: fix <can`t open audit log by deepin-log-viewer>

Bug: https://pms.uniontech.com/bug-view-302415.html
  • Loading branch information
LiHua000 authored and max-lvs committed Feb 14, 2025
1 parent 4a4d0d9 commit 9bbe6a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/dbusproxy/dldbushandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ bool DLDBusHandler::exportLog(const QString &outDir, const QString &in, bool isF

bool DLDBusHandler::isFileExist(const QString &filePath)
{
QDBusPendingReply<bool> reply = m_dbus->isFileExist(filePath);
QDBusPendingReply<QString> reply = m_dbus->isFileExist(filePath);
reply.waitForFinished();
bool bRet = false;
if (reply.isError()) {
qCWarning(logDBusHandler) << "call dbus iterface 'isFileExist()' failed. error info:" << reply.error().message();
} else {
bRet = reply.value();
bRet = (reply.value() == "exist");
}
return bRet;
}
Expand Down

0 comments on commit 9bbe6a5

Please sign in to comment.