aboutsummaryrefslogtreecommitdiff
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 6ed7cd18..827c9aaf 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -854,7 +854,7 @@ type CreateRepoOptions struct {
}
func getRepoInitFile(tp, name string) ([]byte, error) {
- relPath := path.Join("conf", tp, strings.TrimLeft(name, "./"))
+ relPath := path.Join("conf", tp, strings.TrimLeft(path.Clean("/"+name), "/"))
// Use custom file when available.
customPath := path.Join(setting.CustomPath, relPath)