diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-26 19:06:59 -0600 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-26 19:06:59 -0600 |
commit | 1badb2bbccfe81303f69f8dedf57c22fb89d4b99 (patch) | |
tree | 16013b89560f75e3e73f295ccd97ee2e6960cdc7 /models | |
parent | 89b68bdd4502f1c82f5b0686f7e0cf34a274f8a5 (diff) | |
download | gitea-1badb2bbccfe81303f69f8dedf57c22fb89d4b99.tar.gz gitea-1badb2bbccfe81303f69f8dedf57c22fb89d4b99.zip |
Fix #107
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 3 |
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 } |