mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45: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 {
|
class RepositoryViewerController extends ControllerBase {
|
||||||
|
|
||||||
|
// TODO separate to AccountController?
|
||||||
/**
|
/**
|
||||||
* Displays user information.
|
* Displays user information.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ object Directory {
|
|||||||
def getRepositories(owner: String): List[String] = {
|
def getRepositories(owner: String): List[String] = {
|
||||||
val dir = new File("%s/%s".format(RepositoryHome, owner))
|
val dir = new File("%s/%s".format(RepositoryHome, owner))
|
||||||
if(dir.exists){
|
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 {
|
} else {
|
||||||
Nil
|
Nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user