Browse Source

Merge "When renaming the lock file succeeds the lock isn't held anymore"

stable-3.0
Robin Rosenberg 12 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
4796fe7043
  1. 11
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java

11
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java

@ -437,11 +437,16 @@ public class LockFile {
}
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…
Cancel
Save