mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04: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
|
||||
{
|
||||
const QString serverPath = "/kpxc_server";
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
// Use XDG_RUNTIME_DIR instead of /tmp/ if it's available
|
||||
QString path = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) + "/kpxc_server";
|
||||
return path.isEmpty() ? "/tmp/kpxc_server" : path;
|
||||
// Use XDG_RUNTIME_DIR instead of /tmp if it's available
|
||||
QString path = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
|
||||
return path.isEmpty() ? QStandardPaths::writableLocation(QStandardPaths::TempLocation) + serverPath : path + serverPath;
|
||||
#else // Q_OS_MAC, Q_OS_WIN and others
|
||||
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/kpxc_server";
|
||||
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + serverPath;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user