Skip to content

Commit 028b21b

Browse files
authored
fix(backend): remove redundant filepath check in extractLayer (#288)
Signed-off-by: chlins <[email protected]>
1 parent fc74e95 commit 028b21b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/backend/extract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func exportModelArtifact(ctx context.Context, store storage.Storage, manifest oc
109109
// extractLayer extracts the layer to the output directory.
110110
func extractLayer(desc ocispec.Descriptor, outputDir string, reader io.Reader) error {
111111
var filepath string
112-
if desc.Annotations != nil && desc.Annotations[modelspec.AnnotationFilepath] != "" {
112+
if desc.Annotations != nil {
113113
if desc.Annotations[modelspec.AnnotationFilepath] != "" {
114114
filepath = desc.Annotations[modelspec.AnnotationFilepath]
115115
} else {

0 commit comments

Comments
 (0)