diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-26 09:22:08 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-26 09:22:08 -0400 |
commit | 7ab94fe816bd726c995f2937a040c3d8c7898205 (patch) | |
tree | fcf84c1e759c158f461af3cc9f7236443f4992d6 /models | |
parent | 409e4cde7a379bbdbe53367b3726f64b80aed0eb (diff) | |
download | gitea-7ab94fe816bd726c995f2937a040c3d8c7898205.tar.gz gitea-7ab94fe816bd726c995f2937a040c3d8c7898205.zip |
Fix issue on windows
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 477f9472b4..c80d2f2c2c 100644 --- a/models/repo.go +++ b/models/repo.go @@ -251,7 +251,8 @@ func initRepository(f string, user *User, repo *Repository, initReadme bool, rep } defer pu.Close() // TODO: Windows .bat - if _, err = pu.WriteString(fmt.Sprintf("#!/usr/bin/env bash\n%s update $1 $2 $3\n", appPath)); err != nil { + if _, err = pu.WriteString(fmt.Sprintf("#!/usr/bin/env bash\n%s update $1 $2 $3\n", + strings.Replace(appPath, "\\", "/", -1))); err != nil { return err } |