aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/repository.go b/repository.go
index 8a7b348..76be660 100644
--- a/repository.go
+++ b/repository.go
@@ -201,6 +201,14 @@ func PlainOpen(path string) (*Repository, error) {
return nil, err
}
+ if _, err := dot.Stat(""); err != nil {
+ if os.IsNotExist(err) {
+ return nil, ErrRepositoryNotExists
+ }
+
+ return nil, err
+ }
+
s, err := filesystem.NewStorage(dot)
if err != nil {
return nil, err