summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qlockfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qlockfile.cpp')
-rw-r--r--src/corelib/io/qlockfile.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/io/qlockfile.cpp b/src/corelib/io/qlockfile.cpp
index cb1ff93ad3..48317d07e0 100644
--- a/src/corelib/io/qlockfile.cpp
+++ b/src/corelib/io/qlockfile.cpp
@@ -44,6 +44,7 @@
#include <QtCore/qthread.h>
#include <QtCore/qdeadlinetimer.h>
#include <QtCore/qdatetime.h>
+#include <QtCore/qfileinfo.h>
QT_BEGIN_NAMESPACE
@@ -226,6 +227,8 @@ bool QLockFile::tryLock(int timeout)
return false;
case LockFailedError:
if (!d->isLocked && d->isApparentlyStale()) {
+ if (Q_UNLIKELY(QFileInfo(d->fileName).lastModified() > QDateTime::currentDateTime()))
+ qInfo("QLockFile: Lock file '%ls' has a modification time in the future", qUtf16Printable(d->fileName));
// Stale lock from another thread/process
// Ensure two processes don't remove it at the same time
QLockFile rmlock(d->fileName + QLatin1String(".rmlock"));