aboutsummaryrefslogtreecommitdiffstats
path: root/services/wiki/wiki.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-07-21 04:37:00 +0200
committerGitHub <noreply@github.com>2021-07-21 03:37:00 +0100
commit09a4364b2197520c3c6bb0fbcac26eed77c3af2f (patch)
tree2386cac949fd14cd8a91088158e9d9ab0d24f64b /services/wiki/wiki.go
parent0c3467ffb719eed9ed1d6a42be9491af44a1d14d (diff)
downloadgitea-09a4364b2197520c3c6bb0fbcac26eed77c3af2f.tar.gz
gitea-09a4364b2197520c3c6bb0fbcac26eed77c3af2f.zip
Add TestPrepareWikiFileName (#16487) (#16498)
* Add TestPrepareWikiFileName * use LsTree as LsFiles is index only * ajust other tests Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'services/wiki/wiki.go')
-rw-r--r--services/wiki/wiki.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/wiki/wiki.go b/services/wiki/wiki.go
index 94f36ea2f2..f1632c6bf7 100644
--- a/services/wiki/wiki.go
+++ b/services/wiki/wiki.go
@@ -88,7 +88,7 @@ func prepareWikiFileName(gitRepo *git.Repository, wikiName string) (bool, string
escaped := NameToFilename(wikiName)
// Look for both files
- filesInIndex, err := gitRepo.LsFiles(unescaped, escaped)
+ filesInIndex, err := gitRepo.LsTree("master", unescaped, escaped)
if err != nil {
log.Error("%v", err)
return false, escaped, err