Skip to content

Commit

Permalink
test patch cov
Browse files Browse the repository at this point in the history
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
  • Loading branch information
Wwwsylvia committed Sep 14, 2024
1 parent e7333df commit 958648e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/oci/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ func (s *Storage) ingest(expected ocispec.Descriptor, content io.Reader) (path s
if err != nil {
return "", fmt.Errorf("failed to create ingest file: %w", err)
}

path = fp.Name()
defer func() {
// close the temp file and check close error
Expand All @@ -162,7 +163,7 @@ func (s *Storage) ingest(expected ocispec.Descriptor, content io.Reader) (path s
return "", fmt.Errorf("failed to make readonly: %w", err)
}

return path, nil
return
}

// ensureDir ensures the directories of the path exists.
Expand Down

0 comments on commit 958648e

Please sign in to comment.