diff options
| -rw-r--r-- | common.go | 8 | ||||
| -rw-r--r-- | unix.go | 4 |
2 files changed, 12 insertions, 0 deletions
@@ -70,6 +70,14 @@ func (rs *RepoStatus) IsProtobuf() (bool, []string, error) { // returns the filesystem path to the repo func (rs *RepoStatus) Path() string { + if rs == nil { + log.Warn("rs == nil") + return "" + } + if rs.realPath == nil { + log.Warn("rs.realPath == nil") + return "" + } return rs.realPath.String() } @@ -221,6 +221,10 @@ func IsDirectory(path string) bool { } func (rs *RepoStatus) Exists(filename string) bool { + if rs == nil { + log.Warn("rs == nil for Exists()") + panic(-1) + } testf := filepath.Join(rs.Path(), filename) if Exists(testf) { return true |
