From ba86fb272bfd033475b7d5a40b49f6bfb9558671 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 26 Mar 2017 18:47:04 +0200 Subject: Don't store the lockfile inside the main resource folder. We currently use the folder as the main db folder, meaning we remove the folder when removing the db. This results in the lockfile vanishing with the db, which then confuses QLockFile (resulting in a lot of warnings). We may want to start moving everything into a resource-instance folder, but then we have to do it properly across the board. --- synchronizer/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'synchronizer') diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp index e6a4d56..c66a2fb 100644 --- a/synchronizer/main.cpp +++ b/synchronizer/main.cpp @@ -201,7 +201,7 @@ int main(int argc, char *argv[]) SinkLog() << "Starting: " << instanceIdentifier << resourceType; QDir{}.mkpath(Sink::resourceStorageLocation(instanceIdentifier)); - QLockFile lockfile(Sink::resourceStorageLocation(instanceIdentifier) + "/resource.lock"); + QLockFile lockfile(Sink::storageLocation() + QString("/%1.lock").arg(QString(instanceIdentifier))); lockfile.setStaleLockTime(500); if (!lockfile.tryLock(0)) { const auto error = lockfile.error(); -- cgit v1.2.3