content: provide more context for lockfile error

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2016-12-07 17:46:01 -08:00
parent b542cc19ad
commit ab4bfc79e9
No known key found for this signature in database
GPG key ID: FB5F6B2905D7ECF3

View file

@ -256,9 +256,10 @@ func (cs *ContentStore) ingestPaths(ref string) (string, string, lockfile.Lockfi
return "", "", "", errors.Errorf("ref must be a single path component") return "", "", "", errors.Errorf("ref must be a single path component")
} }
lock, err := lockfile.New(filepath.Join(fp, "lock")) lockfilePath := filepath.Join(fp, "lock")
lock, err := lockfile.New(lockfilePath)
if err != nil { if err != nil {
return "", "", "", errors.Wrap(err, "error creating lockfile") return "", "", "", errors.Wrapf(err, "error creating lockfile %v", lockfilePath)
} }
return fp, filepath.Join(fp, "data"), lock, nil return fp, filepath.Join(fp, "data"), lock, nil