mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Change Unix socket location
This commit is contained in:
parent
98131c3e5e
commit
bf5f82ff27
@ -134,11 +134,12 @@ void NativeMessagingBase::sendReply(const QString& reply)
|
|||||||
|
|
||||||
QString NativeMessagingBase::getLocalServerPath() const
|
QString NativeMessagingBase::getLocalServerPath() const
|
||||||
{
|
{
|
||||||
|
const QString serverPath = "/kpxc_server";
|
||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||||
// Use XDG_RUNTIME_DIR instead of /tmp/ if it's available
|
// Use XDG_RUNTIME_DIR instead of /tmp if it's available
|
||||||
QString path = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) + "/kpxc_server";
|
QString path = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
|
||||||
return path.isEmpty() ? "/tmp/kpxc_server" : path;
|
return path.isEmpty() ? QStandardPaths::writableLocation(QStandardPaths::TempLocation) + serverPath : path + serverPath;
|
||||||
#else // Q_OS_MAC, Q_OS_WIN and others
|
#else // Q_OS_MAC, Q_OS_WIN and others
|
||||||
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/kpxc_server";
|
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + serverPath;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user