From ddbf6701b4df04d2c7a84080dfb4d64ef9d3f7a0 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 02 Feb 2012 19:10:21 -0500
Subject: [PATCH] Fixed bug in repository creation related to relinking head feature

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

diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index 6470634..319aca5 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -340,7 +340,7 @@
 					String repository = StringUtils.getRelativePath(basePath,
 							file.getAbsolutePath());
 					list.add(repository);
-				} else if (searchSubfolders) {
+				} else if (searchSubfolders && file.canRead()) {
 					// look for repositories in subfolders
 					list.addAll(getRepositoryList(basePath, file, exportAll, searchSubfolders));
 				}

--
Gitblit v1.9.1