parent
e6f883a9b5
commit
31355467a5
|
@ -70,6 +70,14 @@ func (rs *RepoStatus) IsProtobuf() (bool, []string, error) {
|
||||||
|
|
||||||
// returns the filesystem path to the repo
|
// returns the filesystem path to the repo
|
||||||
func (rs *RepoStatus) Path() string {
|
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()
|
return rs.realPath.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
unix.go
4
unix.go
|
@ -221,6 +221,10 @@ func IsDirectory(path string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rs *RepoStatus) Exists(filename 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)
|
testf := filepath.Join(rs.Path(), filename)
|
||||||
if Exists(testf) {
|
if Exists(testf) {
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue