From 181b3a8f0988ab729270279e6e12534cb52628cc Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Tue, 1 May 2018 04:46:04 +0300 Subject: Fix path cleanup in multiple places (#3871) --- models/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/repo.go b/models/repo.go index a7e8bd2a52..99ab247566 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1133,7 +1133,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. -- cgit v1.2.3