summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/repo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 2011ed7de1..2457174372 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -403,10 +403,11 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep
return err
}
+ rp := strings.NewReplacer("\\", "/", " ", "\\ ")
// hook/post-update
if err := createHookUpdate(filepath.Join(repoPath, "hooks", "update"),
fmt.Sprintf("#!/usr/bin/env %s\n%s update $1 $2 $3\n", base.ScriptType,
- strings.Replace(appPath, "\\", "/", -1))); err != nil {
+ rp.Replace(appPath))); err != nil {
return err
}