mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Change socket location in macOS to temporary dir
This commit is contained in:
parent
72bbf12747
commit
c773d85876
@ -131,13 +131,11 @@ void NativeMessagingBase::sendReply(const QString& reply)
|
|||||||
|
|
||||||
QString NativeMessagingBase::getLocalServerPath() const
|
QString NativeMessagingBase::getLocalServerPath() const
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||||
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/kpxc_server";
|
|
||||||
#elif 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) + "/kpxc_server";
|
||||||
return path.isEmpty() ? "/tmp/kpxc_server" : path;
|
return path.isEmpty() ? "/tmp/kpxc_server" : path;
|
||||||
#else // Q_OS_MAC and others
|
#else // Q_OS_MAC, Q_OS_WIN and others
|
||||||
return "/tmp/kpxc_server";
|
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/kpxc_server";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user