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