summaryrefslogtreecommitdiffstats
path: root/synchronizer
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-26 18:47:04 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-26 18:49:22 +0200
commitba86fb272bfd033475b7d5a40b49f6bfb9558671 (patch)
tree4ff3b9c48ef80b91b2638994bbfe8c531a7f55f6 /synchronizer
parent7811c9e9baaa89ad382db5cd05fbffcb1c876377 (diff)
downloadsink-ba86fb272bfd033475b7d5a40b49f6bfb9558671.tar.gz
sink-ba86fb272bfd033475b7d5a40b49f6bfb9558671.zip
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.
Diffstat (limited to 'synchronizer')
-rw-r--r--synchronizer/main.cpp2
1 files changed, 1 insertions, 1 deletions
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[])
201 SinkLog() << "Starting: " << instanceIdentifier << resourceType; 201 SinkLog() << "Starting: " << instanceIdentifier << resourceType;
202 202
203 QDir{}.mkpath(Sink::resourceStorageLocation(instanceIdentifier)); 203 QDir{}.mkpath(Sink::resourceStorageLocation(instanceIdentifier));
204 QLockFile lockfile(Sink::resourceStorageLocation(instanceIdentifier) + "/resource.lock"); 204 QLockFile lockfile(Sink::storageLocation() + QString("/%1.lock").arg(QString(instanceIdentifier)));
205 lockfile.setStaleLockTime(500); 205 lockfile.setStaleLockTime(500);
206 if (!lockfile.tryLock(0)) { 206 if (!lockfile.tryLock(0)) {
207 const auto error = lockfile.error(); 207 const auto error = lockfile.error();