1
0
Fork 0
forked from forgejo/forgejo
- prevent create reop on existed path
This commit is contained in:
Unknwon 2015-07-26 19:22:17 +08:00
parent 436ef5b50a
commit 6f8e388b55
4 changed files with 21 additions and 2 deletions

View file

@ -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)
}