From a31cf95ac0787eb559cb78f48c52bc6b79e970d8 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 11 Jul 2012 17:10:42 -0400
Subject: [PATCH] Forgot to commit UserModel with cookie field

---
 src/com/gitblit/utils/JGitUtils.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index 72a8ab3..ab5b655 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -309,9 +309,14 @@
 					if (onlyBare && gitDir.getName().equals(".git")) {
 						continue;
 					}
-					// determine repository name relative to base path
-					String repository = FileUtils.getRelativePath(baseFile, file);
-					list.add(repository);
+					if (gitDir.equals(file) || gitDir.getParentFile().equals(file)) {
+						// determine repository name relative to base path
+						String repository = FileUtils.getRelativePath(baseFile, file);
+						list.add(repository);
+					} else if (searchSubfolders && file.canRead()) {
+						// look for repositories in subfolders
+						list.addAll(getRepositoryList(basePath, file, onlyBare, searchSubfolders));
+					}
 				} else if (searchSubfolders && file.canRead()) {
 					// look for repositories in subfolders
 					list.addAll(getRepositoryList(basePath, file, onlyBare, searchSubfolders));

--
Gitblit v1.9.1