return nil if no error

fix https://github.com/chrislusf/seaweedfs/issues/299
This commit is contained in:
Chris Lu 2016-05-05 10:37:33 -07:00
parent 596f58507e
commit e8193ec201

View File

@ -107,6 +107,9 @@ func (dr DistributedOperationResult) Error() error {
errs = append(errs, fmt.Sprintf("[%s]: %v", k, v))
}
}
if len(errs) == 0 {
return nil
}
return errors.New(strings.Join(errs, "\n"))
}