Merge pull request #1256 from dmcgowan/fix-ingest-file-not-exists

Convert file not exists to status not found
This commit is contained in:
Stephen Day 2017-07-27 15:48:41 -07:00 committed by GitHub
commit fdea1ceacd

View File

@ -206,11 +206,17 @@ func (s *store) status(ingestPath string) (content.Status, error) {
dp := filepath.Join(ingestPath, "data")
fi, err := os.Stat(dp)
if err != nil {
if os.IsNotExist(err) {
err = errors.Wrap(errdefs.ErrNotFound, err.Error())
}
return content.Status{}, err
}
ref, err := readFileString(filepath.Join(ingestPath, "ref"))
if err != nil {
if os.IsNotExist(err) {
err = errors.Wrap(errdefs.ErrNotFound, err.Error())
}
return content.Status{}, err
}