diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/LockFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/LockFile.java index 6acd7132a..08dfd7e19 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/LockFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/LockFile.java @@ -488,7 +488,11 @@ public class LockFile { if (haveLck) { haveLck = false; - lck.delete(); + try { + FileUtils.delete(lck, FileUtils.RETRY); + } catch (IOException e) { + // couldn't delete the file even after retry. + } } }