Fix path cleanup in multiple places (#3871) (#3873)

This commit is contained in:
Lauris BH
2018-05-01 17:10:50 +08:00
committed by Bo-Yi Wu
parent 9be48f04cb
commit 15cdb19d77
3 changed files with 17 additions and 7 deletions
+1 -1
View File
@@ -1131,7 +1131,7 @@ type CreateRepoOptions struct {
}
func getRepoInitFile(tp, name string) ([]byte, error) {
cleanedName := strings.TrimLeft(name, "./")
cleanedName := strings.TrimLeft(path.Clean("/"+name), "/")
relPath := path.Join("options", tp, cleanedName)
// Use custom file when available.