diff --git a/src/libs/vmisc/vlockguard.h b/src/libs/vmisc/vlockguard.h index 4895bd3bb..29c47c74c 100644 --- a/src/libs/vmisc/vlockguard.h +++ b/src/libs/vmisc/vlockguard.h @@ -149,9 +149,11 @@ template auto VLockGuard::TryLock(const QString &loc bool res = true; lockFile = lockName + QLatin1String(".lock"); -#if defined(Q_OS_UNIX) - QFileInfo info(lockFile); - lockFile = info.absolutePath() + QLatin1String("/.") + info.fileName(); +#if defined(Q_OS_UNIX) || defined(Q_OS_MACOS) + { + QFileInfo info(lockFile); + lockFile = info.absolutePath() + QLatin1String("/.") + info.fileName(); + } #endif lock.reset(new QLockFile(lockFile));