diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java index 434eadf5f..882f5c8a4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java @@ -557,11 +557,11 @@ public class ObjectDirectory extends FileObjectDatabase { // If the object is already in the repository, remove temporary file. // if (unpackedObjectCache.isUnpacked(id)) { - FileUtils.delete(tmp); + FileUtils.delete(tmp, FileUtils.RETRY); return InsertLooseObjectResult.EXISTS_LOOSE; } if (!createDuplicate && has(id)) { - FileUtils.delete(tmp); + FileUtils.delete(tmp, FileUtils.RETRY); return InsertLooseObjectResult.EXISTS_PACKED; } @@ -571,7 +571,7 @@ public class ObjectDirectory extends FileObjectDatabase { // that already exists. We can't be sure renameTo() would // fail on all platforms if dst exists, so we check first. // - FileUtils.delete(tmp); + FileUtils.delete(tmp, FileUtils.RETRY); return InsertLooseObjectResult.EXISTS_LOOSE; } if (tmp.renameTo(dst)) { @@ -592,7 +592,7 @@ public class ObjectDirectory extends FileObjectDatabase { } if (!createDuplicate && has(id)) { - FileUtils.delete(tmp); + FileUtils.delete(tmp, FileUtils.RETRY); return InsertLooseObjectResult.EXISTS_PACKED; } @@ -601,7 +601,7 @@ public class ObjectDirectory extends FileObjectDatabase { // either. We really don't know what went wrong, so // fail. // - FileUtils.delete(tmp); + FileUtils.delete(tmp, FileUtils.RETRY); return InsertLooseObjectResult.FAILURE; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java index c55c60a20..c3e6ad963 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java @@ -182,7 +182,7 @@ class ObjectDirectoryInserter extends ObjectInserter { return tmp; } finally { if (delete) - FileUtils.delete(tmp); + FileUtils.delete(tmp, FileUtils.RETRY); } } @@ -211,7 +211,7 @@ class ObjectDirectoryInserter extends ObjectInserter { return tmp; } finally { if (delete) - FileUtils.delete(tmp); + FileUtils.delete(tmp, FileUtils.RETRY); } }