Merge pull request #1256 from dmcgowan/fix-ingest-file-not-exists
Convert file not exists to status not found
This commit is contained in:
commit
fdea1ceacd
@ -206,11 +206,17 @@ func (s *store) status(ingestPath string) (content.Status, error) {
|
|||||||
dp := filepath.Join(ingestPath, "data")
|
dp := filepath.Join(ingestPath, "data")
|
||||||
fi, err := os.Stat(dp)
|
fi, err := os.Stat(dp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
err = errors.Wrap(errdefs.ErrNotFound, err.Error())
|
||||||
|
}
|
||||||
return content.Status{}, err
|
return content.Status{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
ref, err := readFileString(filepath.Join(ingestPath, "ref"))
|
ref, err := readFileString(filepath.Join(ingestPath, "ref"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
err = errors.Wrap(errdefs.ErrNotFound, err.Error())
|
||||||
|
}
|
||||||
return content.Status{}, err
|
return content.Status{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user