Fix a bug where IgnoreErrors was inverted.

Also make an error message a little more verbose.
This commit is contained in:
Brendan Burns
2015-05-13 14:16:24 +01:00
parent 7ba41626e9
commit ea3852ec69
2 changed files with 8 additions and 2 deletions

View File

@@ -217,7 +217,7 @@ func (v *PathVisitor) Visit(fn VisitorFunc) error {
}
info, err := v.Mapper.InfoForData(data, v.Path)
if err != nil {
if v.IgnoreErrors {
if !v.IgnoreErrors {
return err
}
glog.V(2).Infof("Unable to load file %q: %v", v.Path, err)
@@ -280,7 +280,7 @@ func (v *DirectoryVisitor) Visit(fn VisitorFunc) error {
}
info, err := v.Mapper.InfoForData(data, path)
if err != nil {
if v.IgnoreErrors {
if !v.IgnoreErrors {
return err
}
glog.V(2).Infof("Unable to load file %q: %v", path, err)