mirror of
https://github.com/go-gitea/gitea
synced 2024-10-31 08:43:34 +01:00
bug fixed
This commit is contained in:
parent
b27e8e87f8
commit
d80f43ca81
@ -305,11 +305,11 @@ func GetReposFiles(userName, reposName, branchName, rpath string) ([]*RepoFile,
|
|||||||
if rpath != "" {
|
if rpath != "" {
|
||||||
rpath = rpath + "/"
|
rpath = rpath + "/"
|
||||||
}
|
}
|
||||||
fmt.Println("...", rpath, "...")
|
//fmt.Println("...", rpath, "...")
|
||||||
|
|
||||||
tree.Walk(func(dirname string, entry *git.TreeEntry) int {
|
tree.Walk(func(dirname string, entry *git.TreeEntry) int {
|
||||||
if dirname == rpath {
|
if dirname == rpath {
|
||||||
fmt.Println("====", dirname, "==", entry.Name)
|
//fmt.Println("====", dirname, "==", entry.Name)
|
||||||
repofiles = append(repofiles, &RepoFile{
|
repofiles = append(repofiles, &RepoFile{
|
||||||
entry.Id,
|
entry.Id,
|
||||||
entry.Filemode,
|
entry.Filemode,
|
||||||
|
@ -14,15 +14,15 @@
|
|||||||
<li><a href="//{{.RepositoryLink}}/branch/develop">develop</a></li>
|
<li><a href="//{{.RepositoryLink}}/branch/develop">develop</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<ol class="breadcrumb">
|
{{$paths := .Paths}}
|
||||||
<li class="root dir">{{.Repository.Name}}</li>
|
|
||||||
{{$paths := .Paths}}
|
|
||||||
{{ $username := .Username}}
|
{{ $username := .Username}}
|
||||||
{{ $reponame := .Reponame}}
|
{{ $reponame := .Reponame}}
|
||||||
{{ $branchname := .Branchname}}
|
{{ $branchname := .Branchname}}
|
||||||
{{ $treenames := .Treenames}}
|
{{ $treenames := .Treenames}}
|
||||||
{{ $n := len $treenames}}
|
{{ $n := len $treenames}}
|
||||||
{{ $l := Subtract $n 1}}
|
{{ $l := Subtract $n 1}}
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="root dir"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li>
|
||||||
{{range $i, $v := $treenames}}
|
{{range $i, $v := $treenames}}
|
||||||
<li class="dir">
|
<li class="dir">
|
||||||
{{if eq $i $l}}{{$v}}
|
{{if eq $i $l}}{{$v}}
|
||||||
|
Loading…
Reference in New Issue
Block a user