Skip to content

Commit 474783f

Browse files
committed
Use getBlob
1 parent b2cf85a commit 474783f

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

image/oci/layout/oci_src.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -161,20 +161,7 @@ func (s *ociImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache
161161
}
162162
}
163163

164-
path, err := s.ref.blobPath(info.Digest, s.sharedBlobDir)
165-
if err != nil {
166-
return nil, 0, err
167-
}
168-
169-
r, err := os.Open(path)
170-
if err != nil {
171-
return nil, 0, err
172-
}
173-
fi, err := r.Stat()
174-
if err != nil {
175-
return nil, 0, err
176-
}
177-
return r, fi.Size(), nil
164+
return s.ref.getBlob(info.Digest, s.sharedBlobDir)
178165
}
179166

180167
// getExternalBlob returns the reader of the first available blob URL from urls, which must not be empty.

0 commit comments

Comments
 (0)