From a87b540b45ded2c2ad493fec4e82d22d5a417960 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 9 Jan 2017 17:08:08 +0100 Subject: Create the lockfiles in the data directory. The ended up in the home directory. --- synchronizer/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp index c0c3c2d..afc3c26 100644 --- a/synchronizer/main.cpp +++ b/synchronizer/main.cpp @@ -36,6 +36,7 @@ #include "listener.h" #include "log.h" #include "test.h" +#include "definitions.h" SINK_DEBUG_AREA("main") @@ -163,7 +164,7 @@ int main(int argc, char *argv[]) Sink::Log::setPrimaryComponent(instanceIdentifier); SinkLog() << "Starting: " << instanceIdentifier << resourceType; - QLockFile lockfile(instanceIdentifier + ".lock"); + QLockFile lockfile(Sink::resourceStorageLocation(instanceIdentifier) + "/resource.lock"); lockfile.setStaleLockTime(500); if (!lockfile.tryLock(0)) { SinkWarning() << "Failed to acquire exclusive lock on socket."; -- cgit v1.2.3