From ccbb0352317f90504eaac5dd522c4f406cdccd91 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Thu, 27 Jul 2017 15:36:40 -0700 Subject: [PATCH] Convert file not exists to status not found Fixes message on pull about a statuses not being found. These statuses can just be ignored since they are no longer valid and holding the database lock while reading statuses is not necessary. Closes #1231 Signed-off-by: Derek McGowan --- content/local/store.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/local/store.go b/content/local/store.go index 170a84f98..fb9293034 100644 --- a/content/local/store.go +++ b/content/local/store.go @@ -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 }