summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-26 19:06:59 -0600
committerUnknown <joe2010xtmf@163.com>2014-04-26 19:06:59 -0600
commit1badb2bbccfe81303f69f8dedf57c22fb89d4b99 (patch)
tree16013b89560f75e3e73f295ccd97ee2e6960cdc7 /models
parent89b68bdd4502f1c82f5b0686f7e0cf34a274f8a5 (diff)
downloadgitea-1badb2bbccfe81303f69f8dedf57c22fb89d4b99.tar.gz
gitea-1badb2bbccfe81303f69f8dedf57c22fb89d4b99.zip
Fix #107
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
}