Skip to content

Commit

Permalink
squashme: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Osvaldo Barrera committed May 10, 2022
1 parent 3777247 commit 86f3b1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/browser/BrowserShared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include "config-keepassx.h"

#include <QStandardPaths>
#include <QDir>
#include <QStandardPaths>
#if defined(KEEPASSXC_DIST_SNAP)
#include <QProcessEnvironment>
#endif
Expand All @@ -38,16 +38,16 @@ namespace BrowserShared
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
// Use XDG_RUNTIME_DIR if available, else use /tmp.
QString xdgRuntimePath = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
if (xdgRuntimePath.isEmpty()) {
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + serverName;
}
if (xdgRuntimePath.isEmpty())
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + serverName;

QDir xdgRuntimeDir = QDir(xdgRuntimePath);

// Put the socket in a dedicated directory.
// This directory will be easily mountable by sandbox containers.
QDir socketDir = xdgRuntimeDir.filePath("app/org.keepassxc.KeePassXC");
if (!socketDir.exists()) xdgRuntimeDir.mkpath("app/org.keepassxc.KeePassXC");
if (!socketDir.exists())
xdgRuntimeDir.mkpath("app/org.keepassxc.KeePassXC");

QString socketPath = socketDir.path() + "/BrowserServer.socket";

Expand Down

0 comments on commit 86f3b1d

Please sign in to comment.