mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-28 21:06:59 -08:00
Use Snap-Specific directories
* Fix native messaging to use user-specific common folder * Open attachments in snap data folder
This commit is contained in:
1 parent
5341a8215c
commit
3d5879b8ed
2 files changed
+10
-1
No files matched your search
@@ -19,6 +19,8 @@
|
||||
#include "NativeMessagingBase.h"
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include "config-keepassx.h"
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
|
||||
#include <sys/event.h>
|
||||
#include <sys/time.h>
|
||||
@@ -138,7 +140,7 @@ QString NativeMessagingBase::getLocalServerPath() const
|
||||
{
|
||||
const QString serverPath = "/kpxc_server";
|
||||
#if defined(KEEPASSXC_DIST_SNAP)
|
||||
return QProcessEnvironment::systemEnvironment().value("SNAP_COMMON") + serverPath;
|
||||
return QProcessEnvironment::systemEnvironment().value("SNAP_USER_COMMON") + serverPath;
|
||||
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||
// Use XDG_RUNTIME_DIR instead of /tmp if it's available
|
||||
QString path = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
|
||||
|
||||
Reference in new issue
Block a user