summaryrefslogtreecommitdiff
path: root/newRepo.go
diff options
context:
space:
mode:
Diffstat (limited to 'newRepo.go')
-rw-r--r--newRepo.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/newRepo.go b/newRepo.go
index 0932ed6..3dbde0e 100644
--- a/newRepo.go
+++ b/newRepo.go
@@ -1,6 +1,8 @@
package repolist
import (
+ "errors"
+
"go.wit.com/lib/gui/repostatus"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
@@ -60,9 +62,14 @@ func (r *RepoRow) Show2() {
// adds a gui row to the table based off the repo protobuf
func (r *RepoList) AddRepo(pb *gitpb.Repo) (*RepoRow, error) {
+ if !pb.IsDirectory() {
+ // this directory doesn't exist anymore
+ // was moved, or isn't in the ~/go/src or wherever go.work is
+ return nil, errors.New("path is gone: " + pb.FullPath)
+ }
test, ok := r.allrepos[pb.GetGoPath()]
if ok {
- // this repo already exists
+ // this repo gopath was already added
return test, nil
}