Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/dir: validate: correct error messages #121

Merged
merged 1 commit into from
May 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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