Refactoring.

develop
Roman Telezhynskyi 2024-04-18 16:56:25 +03:00
parent df0d430c2b
commit 4a97ca14bf
1 changed files with 5 additions and 3 deletions

View File

@ -149,9 +149,11 @@ template <typename Guarded> auto VLockGuard<Guarded>::TryLock(const QString &loc
bool res = true; bool res = true;
lockFile = lockName + QLatin1String(".lock"); lockFile = lockName + QLatin1String(".lock");
#if defined(Q_OS_UNIX) #if defined(Q_OS_UNIX) || defined(Q_OS_MACOS)
QFileInfo info(lockFile); {
lockFile = info.absolutePath() + QLatin1String("/.") + info.fileName(); QFileInfo info(lockFile);
lockFile = info.absolutePath() + QLatin1String("/.") + info.fileName();
}
#endif #endif
lock.reset(new QLockFile(lockFile)); lock.reset(new QLockFile(lockFile));