aboutsummaryrefslogtreecommitdiff
path: root/modules/options/base.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/options/base.go')
-rw-r--r--modules/options/base.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/options/base.go b/modules/options/base.go
index 3c140f643..e83e8df5d 100644
--- a/modules/options/base.go
+++ b/modules/options/base.go
@@ -16,27 +16,27 @@ import (
// Locale reads the content of a specific locale from static/bindata or custom path.
func Locale(name string) ([]byte, error) {
- return fileFromDir(path.Join("locale", path.Clean("/"+name)))
+ return fileFromDir(path.Join("locale", util.CleanPath(name)))
}
// Readme reads the content of a specific readme from static/bindata or custom path.
func Readme(name string) ([]byte, error) {
- return fileFromDir(path.Join("readme", path.Clean("/"+name)))
+ return fileFromDir(path.Join("readme", util.CleanPath(name)))
}
// Gitignore reads the content of a gitignore locale from static/bindata or custom path.
func Gitignore(name string) ([]byte, error) {
- return fileFromDir(path.Join("gitignore", path.Clean("/"+name)))
+ return fileFromDir(path.Join("gitignore", util.CleanPath(name)))
}
// License reads the content of a specific license from static/bindata or custom path.
func License(name string) ([]byte, error) {
- return fileFromDir(path.Join("license", path.Clean("/"+name)))
+ return fileFromDir(path.Join("license", util.CleanPath(name)))
}
// Labels reads the content of a specific labels from static/bindata or custom path.
func Labels(name string) ([]byte, error) {
- return fileFromDir(path.Join("label", path.Clean("/"+name)))
+ return fileFromDir(path.Join("label", util.CleanPath(name)))
}
// WalkLocales reads the content of a specific locale