瀏覽代碼

Fix the socket path to /tmp on Unix so that we can remove it when it's stale.

Tobias Hieta 9 年之前
父節點
當前提交
d32c32c052
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/shared/Paths.cpp

+ 4 - 0
src/shared/Paths.cpp

@@ -86,5 +86,9 @@ QString Paths::socketName(const QString& serverName)
   if(userName.isEmpty())
     userName = "unknown";
 
+#ifdef Q_OS_UNIX
+  return QString("/tmp/pmp_%1_%2.sock").arg(serverName).arg(userName);
+#else
   return QString("pmp_%1_%2.sock").arg(serverName).arg(userName);
+#endif
 }