Wiki repositories should be not displayed in the repository list.

This commit is contained in:
takezoe
2013-05-03 15:23:49 +09:00
parent 9ac0a04e3a
commit 46267d8657
2 changed files with 4 additions and 1 deletions

View File

@@ -19,7 +19,9 @@ object Directory {
def getRepositories(owner: String): List[String] = {
val dir = new File("%s/%s".format(RepositoryHome, owner))
if(dir.exists){
dir.listFiles.filter(_.isDirectory).map(_.getName.replaceFirst("\\.git$", "")).toList
dir.listFiles.filter { file =>
file.isDirectory && !file.getName.endsWith(".wiki.git")
}.map(_.getName.replaceFirst("\\.git$", "")).toList
} else {
Nil
}