Skip to content

Commit

Permalink
drivers/dir: validate: correct error messages
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
  • Loading branch information
vrothberg committed May 11, 2017
1 parent 978bc28 commit 5e29029
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oci/cas/drivers/dir/dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (e *dirEngine) validate() error {
// XXX: Currently the meaning of this field is not adequately defined by
// the spec, nor is the "official" value determined by the spec.
if ociLayout.Version != ImageLayoutVersion {
return errors.Wrap(cas.ErrInvalid, "layout version is supported")
return errors.Wrap(cas.ErrInvalid, "layout version is not supported")
}

// Check that "blobs" and "refs" exist in the image.
Expand All @@ -136,7 +136,7 @@ func (e *dirEngine) validate() error {
}
return errors.Wrap(err, "check blobdir")
} else if !fi.IsDir() {
return errors.Wrap(cas.ErrInvalid, "blobdir is directory")
return errors.Wrap(cas.ErrInvalid, "blobdir is not a directory")
}

if fi, err := os.Stat(filepath.Join(e.path, refDirectory)); err != nil {
Expand All @@ -145,7 +145,7 @@ func (e *dirEngine) validate() error {
}
return errors.Wrap(err, "check refdir")
} else if !fi.IsDir() {
return errors.Wrap(cas.ErrInvalid, "refdir is directory")
return errors.Wrap(cas.ErrInvalid, "refdir is not a directory")
}

return nil
Expand Down

0 comments on commit 5e29029

Please sign in to comment.