Skip to content
Permalink
Browse files

Merge PR #3066: SocketRPC: ensure pipe paths match up.

  • Loading branch information...
mkrautz committed May 7, 2017
2 parents 81b00bf + 3705494 commit a6aba12be70ac00d1b85b66107a23beee6a4c076
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/mumble/SocketRPC.cpp
@@ -272,7 +272,16 @@ bool SocketRPC::send(const QString &basename, const QString &request, const QMap
#ifdef Q_OS_WIN
pipepath = basename;
#else
pipepath = QDir::home().absoluteFilePath(QLatin1String(".") + basename + QLatin1String("Socket"));
{
QString xdgRuntimePath = QProcessEnvironment::systemEnvironment().value(QLatin1String("XDG_RUNTIME_DIR"));
QDir xdgRuntimeDir = QDir(xdgRuntimePath);

if (! xdgRuntimePath.isNull() && xdgRuntimeDir.exists()) {
pipepath = xdgRuntimeDir.absoluteFilePath(basename + QLatin1String("Socket"));
} else {
pipepath = QDir::home().absoluteFilePath(QLatin1String(".") + basename + QLatin1String("Socket"));
}
}
#endif

QLocalSocket qls;

0 comments on commit a6aba12

Please sign in to comment.
You can’t perform that action at this time.