summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2018-08-27 01:13:38 +0200
committerDavid Pursehouse <david.pursehouse@gmail.com>2018-09-12 09:12:11 +0900
commit667ac8b3189336efbdb0484e212c36beb4ed5338 (patch)
treef607b1492583a67ce3e646b36198e2af0a47840f
parentc78d6445ec927b660e2abe6e9e0bd6324215b0a5 (diff)
downloadjgit-667ac8b3189336efbdb0484e212c36beb4ed5338.tar.gz
jgit-667ac8b3189336efbdb0484e212c36beb4ed5338.zip
Fix NoSuchFileException during directory cleanup in RefDirectory
Bug: 538285 Change-Id: Iab5c381a412cb2c2176af55189668c267ed29fbc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> (cherry picked from commit 8ab89ef066f91a7d39b705f4e61498f37291ffab) Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
index 91f5d7dc8a..8338b2c8a2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
@@ -1093,7 +1093,7 @@ public class RefDirectory extends RefDatabase {
File dir = file.getParentFile();
for (int i = 0; i < depth; ++i) {
try {
- Files.delete(dir.toPath());
+ Files.deleteIfExists(dir.toPath());
} catch (DirectoryNotEmptyException e) {
// Don't log; normal case when there are other refs with the
// same prefix