summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/utils/JGitUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/gitblit/utils/JGitUtils.java')
-rw-r--r--src/com/gitblit/utils/JGitUtils.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index f86596d5..c9c13c56 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -80,6 +80,9 @@ public class JGitUtils {
public static List<String> getNestedRepositories(File repositoriesFolder, File folder, boolean exportAll, boolean readNested) {
String basefile = repositoriesFolder.getAbsolutePath();
List<String> list = new ArrayList<String>();
+ if (folder == null || !folder.exists()) {
+ return list;
+ }
for (File file : folder.listFiles()) {
if (file.isDirectory() && !file.getName().equalsIgnoreCase(Constants.DOT_GIT)) {
// if this is a git repository add it to the list