mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-09-27 03:41:17 -04:00
Make setNativeLocks() non-fatal on OS X.
This commit is contained in:
parent
ceeb72a277
commit
af3d896bdf
1 changed files with 6 additions and 0 deletions
|
@ -169,7 +169,13 @@ bool QLockFilePrivate::removeStaleLock()
|
|||
const int fd = qt_safe_open(lockFileName.constData(), O_WRONLY, 0644);
|
||||
if (fd < 0) // gone already?
|
||||
return false;
|
||||
#ifdef Q_OS_MAC
|
||||
// ugly workaround: ignore setNativeLocks() result on Mac since it's broken there
|
||||
setNativeLocks(fd);
|
||||
bool success = (::unlink(lockFileName) == 0);
|
||||
#else
|
||||
bool success = setNativeLocks(fd) && (::unlink(lockFileName) == 0);
|
||||
#endif
|
||||
close(fd);
|
||||
return success;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue