Merge "When renaming the lock file succeeds the lock isn't held anymore"
This commit is contained in:
commit
4796fe7043
|
@ -437,11 +437,16 @@ public boolean commit() {
|
|||
}
|
||||
|
||||
saveStatInformation();
|
||||
if (lck.renameTo(ref))
|
||||
if (lck.renameTo(ref)) {
|
||||
haveLck = false;
|
||||
return true;
|
||||
if (!ref.exists() || deleteRef())
|
||||
if (renameLock())
|
||||
}
|
||||
if (!ref.exists() || deleteRef()) {
|
||||
if (renameLock()) {
|
||||
haveLck = false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
unlock();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue