summaryrefslogtreecommitdiffstats
path: root/services/repository/files/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/files/file.go')
-rw-r--r--services/repository/files/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/files/file.go b/services/repository/files/file.go
index 7886119587..ddbced809e 100644
--- a/services/repository/files/file.go
+++ b/services/repository/files/file.go
@@ -129,7 +129,7 @@ func GetAuthorAndCommitterUsers(author, committer *IdentityOptions, doer *user_m
// CleanUploadFileName Trims a filename and returns empty string if it is a .git directory
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" {