From 9aa37e8e23f01eefc25f6d9abdb8c87e5a59a0e8 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Mon, 25 Dec 2017 21:07:07 +0200 Subject: [PATCH] dont confuse lock files between different users --- app/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/main.cpp b/app/main.cpp index 428c2694c..5f9e6c5ba 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -89,7 +89,12 @@ int main(int argc, char **argv) parser.process(app); - QLockFile lockFile {QDir::tempPath() + "/latte-dock.lock"}; + QString username = qgetenv("USER"); + + if (username.isEmpty()) + username = qgetenv("USERNAME"); + + QLockFile lockFile {QDir::tempPath() + "/latte-dock." + username + ".lock"}; int timeout {100};