diff options
author | Unknwon <u@gogs.io> | 2015-09-03 08:09:08 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-03 08:09:08 -0400 |
commit | 38eb000d13d5f082e45da4629914fb3d8e633379 (patch) | |
tree | 506bbd11532330e921b3f7bab82e440e3d1034c1 /models/repo.go | |
parent | 7ec991326d550957b278475057965e197f6e0324 (diff) | |
download | gitea-38eb000d13d5f082e45da4629914fb3d8e633379.tar.gz gitea-38eb000d13d5f082e45da4629914fb3d8e633379.zip |
work on #1570
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go index cda0c0b98a..346eb64736 100644 --- a/models/repo.go +++ b/models/repo.go @@ -245,13 +245,17 @@ func (repo *Repository) GetBaseRepo() (err error) { return err } -func (repo *Repository) RepoPath() (string, error) { - if err := repo.GetOwner(); err != nil { +func (repo *Repository) repoPath(e Engine) (string, error) { + if err := repo.getOwner(e); err != nil { return "", err } return RepoPath(repo.Owner.Name, repo.Name), nil } +func (repo *Repository) RepoPath() (string, error) { + return repo.repoPath(x) +} + func (repo *Repository) RepoLink() (string, error) { if err := repo.GetOwner(); err != nil { return "", err @@ -1057,7 +1061,7 @@ func DeleteRepository(uid, repoID int64) error { } // Remove repository files. - repoPath, err := repo.RepoPath() + repoPath, err := repo.repoPath(sess) if err != nil { return fmt.Errorf("RepoPath: %v", err) } |