1
0
mirror of https://github.com/go-gitea/git.git synced 2026-02-05 15:45:40 +01:00

minor fix

This commit is contained in:
Unknwon
2015-11-27 01:50:46 -05:00
parent e97767e2eb
commit d86a90f801
3 changed files with 6 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ func (t *Tree) SubTree(rpath string) (*Tree, error) {
}
// ListEntries returns all entries of current tree.
func (t *Tree) ListEntries(relpath string) (Entries, error) {
func (t *Tree) ListEntries() (Entries, error) {
if t.entriesParsed {
return t.entries, nil
}

View File

@@ -24,7 +24,7 @@ func (t *Tree) GetTreeEntryByPath(relpath string) (*TreeEntry, error) {
tree := t
for i, name := range parts {
if i == len(parts)-1 {
entries, err := tree.ListEntries(path.Dir(relpath))
entries, err := tree.ListEntries()
if err != nil {
return nil, err
}

View File

@@ -31,6 +31,10 @@ type TreeEntry struct {
sized bool
}
func (te *TreeEntry) Name() string {
return te.name
}
func (te *TreeEntry) IsDir() bool {
return te.mode == ENTRY_MODE_TREE
}