diff options
author | Unknwon <u@gogs.io> | 2015-07-26 19:22:17 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-07-26 19:22:17 +0800 |
commit | 6f8e388b5530e85f141ea3aa345b1c6842fbe1f5 (patch) | |
tree | 3ea3119fa2a1292c801aaddddc00308c434bf6ca /modules/git/utils.go | |
parent | 436ef5b50a32c7ff2053bce7f5b3eaf6abe0c984 (diff) | |
download | gitea-6f8e388b5530e85f141ea3aa345b1c6842fbe1f5.tar.gz gitea-6f8e388b5530e85f141ea3aa345b1c6842fbe1f5.zip |
fix #1169
- prevent create reop on existed path
Diffstat (limited to 'modules/git/utils.go')
-rw-r--r-- | modules/git/utils.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/git/utils.go b/modules/git/utils.go index 6abbca557b..78792aaf5e 100644 --- a/modules/git/utils.go +++ b/modules/git/utils.go @@ -7,6 +7,7 @@ package git import ( "bytes" "container/list" + "fmt" "os" "path/filepath" "strings" @@ -67,3 +68,10 @@ func isFile(filePath string) bool { } return !f.IsDir() } + +func concatenateError(err error, stderr string) error { + if len(stderr) == 0 { + return err + } + return fmt.Errorf("%v: %s", err, stderr) +} |