Skip to content

Commit 7f39e27

Browse files
committed
Merge branch 'main' into feature/improve_options
2 parents 6c12c49 + a12f575 commit 7f39e27

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/options/base.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ import (
1616

1717
// Locale reads the content of a specific locale from static/bindata or custom path.
1818
func Locale(name string) ([]byte, error) {
19-
return fileFromDir(path.Join("locale", name))
19+
return fileFromDir(path.Join("locale", path.Clean("/"+name)))
2020
}
2121

2222
// Readme reads the content of a specific readme from static/bindata or custom path.
2323
func Readme(name string) ([]byte, error) {
24-
return fileFromDir(path.Join("readme", name))
24+
return fileFromDir(path.Join("readme", path.Clean("/"+name)))
2525
}
2626

2727
// Gitignore reads the content of a gitignore locale from static/bindata or custom path.
2828
func Gitignore(name string) ([]byte, error) {
29-
return fileFromDir(path.Join("gitignore", name))
29+
return fileFromDir(path.Join("gitignore", path.Clean("/"+name)))
3030
}
3131

3232
// License reads the content of a specific license from static/bindata or custom path.
3333
func License(name string) ([]byte, error) {
34-
return fileFromDir(path.Join("license", name))
34+
return fileFromDir(path.Join("license", path.Clean("/"+name)))
3535
}
3636

3737
// Labels reads the content of a specific labels from static/bindata or custom path.
3838
func Labels(name string) ([]byte, error) {
39-
return fileFromDir(path.Join("label", name))
39+
return fileFromDir(path.Join("label", path.Clean("/"+name)))
4040
}
4141

4242
// WalkLocales reads the content of a specific locale

0 commit comments

Comments
 (0)