summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDirectory.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDirectory.java
index 90ac0bf47e..faebbf67cc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDirectory.java
@@ -331,18 +331,19 @@ public class RefDirectory extends RefDatabase {
}
}
- private void scanTree(String prefix, File dir) {
+ private boolean scanTree(String prefix, File dir) {
final String[] entries = dir.list(LockFile.FILTER);
- if (entries != null && 0 < entries.length) {
+ if (entries == null) // not a directory or an I/O error
+ return false;
+ if (0 < entries.length) {
Arrays.sort(entries);
for (String name : entries) {
File e = new File(dir, name);
- if (e.isDirectory())
- scanTree(prefix + name + '/', e);
- else
+ if (!scanTree(prefix + name + '/', e))
scanOne(prefix + name);
}
}
+ return true;
}
private void scanOne(String name) {