aboutsummaryrefslogtreecommitdiff
path: root/routers/web/repo/editor.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/editor.go')
-rw-r--r--routers/web/repo/editor.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/editor.go b/routers/web/repo/editor.go
index 1a7edb7bb..5904ba2f0 100644
--- a/routers/web/repo/editor.go
+++ b/routers/web/repo/editor.go
@@ -728,7 +728,7 @@ func UploadFilePost(ctx *context.Context) {
func cleanUploadFileName(name string) string {
// Rebase the filename
- name = strings.Trim(path.Clean("/"+name), " /")
+ name = strings.Trim(path.Clean("/"+name), "/")
// Git disallows any filenames to have a .git directory in them.
for _, part := range strings.Split(name, "/") {
if strings.ToLower(part) == ".git" {