diff options
author | 6543 <6543@obermui.de> | 2021-07-20 15:16:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 15:16:20 +0200 |
commit | b26c3b482feb57704aa399d8d72a959ce667b879 (patch) | |
tree | 1984bacf320a1d4b8516807d5afe138d8842dd7e /services/wiki/wiki.go | |
parent | 263577842563a8a692212f897bec685751c78f23 (diff) | |
download | gitea-b26c3b482feb57704aa399d8d72a959ce667b879.tar.gz gitea-b26c3b482feb57704aa399d8d72a959ce667b879.zip |
Add TestPrepareWikiFileName (#16487)
* 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.go | 2 |
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 |