summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2018-08-27 01:13:38 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2018-08-27 09:12:02 +0200
commit8ab89ef066f91a7d39b705f4e61498f37291ffab (patch)
tree334b73316fd089398819e549d5013426509efadb
parentcde0e313819c0209eb692820fb32f85e5b034e16 (diff)
downloadjgit-8ab89ef066f91a7d39b705f4e61498f37291ffab.tar.gz
jgit-8ab89ef066f91a7d39b705f4e61498f37291ffab.zip
Fix NoSuchFileException during directory cleanup in RefDirectory
Bug: 538285 Change-Id: Iab5c381a412cb2c2176af55189668c267ed29fbc Signed-off-by: Matthias Sohn <matthias.sohn@sap.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 b088d72660..450f3939a5 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
@@ -1287,7 +1287,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