aboutsummaryrefslogtreecommitdiffstats
path: root/models/wiki.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-02-05 16:56:30 +0200
committerGitHub <noreply@github.com>2018-02-05 16:56:30 +0200
commit283e87d8145ac5dd61f86f61e347ffa684ac5684 (patch)
tree258a5d90d5e8117a9ffe412505a82212c4a38eb1 /models/wiki.go
parentb16c84de7b402c03ffda2dc9dd1ebc4f89928d0f (diff)
downloadgitea-283e87d8145ac5dd61f86f61e347ffa684ac5684.tar.gz
gitea-283e87d8145ac5dd61f86f61e347ffa684ac5684.zip
Fix rendering of wiki page list if wiki repo contains other files (#3454)
* Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests
Diffstat (limited to 'models/wiki.go')
-rw-r--r--models/wiki.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/wiki.go b/models/wiki.go
index 3a39daf0f6..3e0d1b9ce8 100644
--- a/models/wiki.go
+++ b/models/wiki.go
@@ -45,7 +45,7 @@ func WikiNameToFilename(name string) string {
// WikiFilenameToName converts a wiki filename to its corresponding page name.
func WikiFilenameToName(filename string) (string, error) {
if !strings.HasSuffix(filename, ".md") {
- return "", fmt.Errorf("Invalid wiki filename: %s", filename)
+ return "", ErrWikiInvalidFileName{filename}
}
basename := filename[:len(filename)-3]
unescaped, err := url.QueryUnescape(basename)