mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
Wiki repositories should be not displayed in the repository list.
This commit is contained in:
@@ -66,6 +66,7 @@ case class ContentInfo(viewType: String, content: Option[String])
|
||||
*/
|
||||
class RepositoryViewerController extends ControllerBase {
|
||||
|
||||
// TODO separate to AccountController?
|
||||
/**
|
||||
* Displays user information.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user