aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_base_gogit.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_base_gogit.go')
-rw-r--r--modules/git/repo_base_gogit.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/git/repo_base_gogit.go b/modules/git/repo_base_gogit.go
index 0ca1ea79c2..293aca159c 100644
--- a/modules/git/repo_base_gogit.go
+++ b/modules/git/repo_base_gogit.go
@@ -49,7 +49,12 @@ func OpenRepository(ctx context.Context, repoPath string) (*Repository, error) {
repoPath, err := filepath.Abs(repoPath)
if err != nil {
return nil, err
- } else if !isDir(repoPath) {
+ }
+ exist, err := util.IsDir(repoPath)
+ if err != nil {
+ return nil, err
+ }
+ if !exist {
return nil, util.NewNotExistErrorf("no such file or directory")
}