diff options
Diffstat (limited to 'src/corelib/io/qlockfile_unix.cpp')
-rw-r--r-- | src/corelib/io/qlockfile_unix.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp index d1ef9c1770..cd4cf3a50d 100644 --- a/src/corelib/io/qlockfile_unix.cpp +++ b/src/corelib/io/qlockfile_unix.cpp @@ -206,7 +206,10 @@ void QLockFile::unlock() return; close(d->fileHandle); d->fileHandle = -1; - QFile::remove(d->fileName); + if (!QFile::remove(d->fileName)) { + qWarning() << "Could not remove our own lock file" << d->fileName << "maybe permissions changed meanwhile?"; + // This is bad because other users of this lock file will now have to wait for the stale-lock-timeout... + } d->lockError = QLockFile::NoError; d->isLocked = false; } |