Skip to content

Commit

Permalink
Merge pull request #1130 from jiangliu/fix-get-compressed-size
Browse files Browse the repository at this point in the history
nydus-image: fix a underflow issue in get_compressed_size()
  • Loading branch information
imeoer committed Mar 3, 2023
2 parents 88e3fe0 + 8a4bc8b commit bca1b8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bin/nydus-image/core/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ impl Blob {
blob_mgr: &mut BlobManager,
blob_writer: &mut ArtifactWriter,
) -> Result<()> {
if ctx.blob_inline_meta || ctx.features.is_enabled(Feature::BlobToc) {
if !ctx.blob_features.contains(BlobFeatures::SEPARATE)
&& (ctx.blob_inline_meta || ctx.features.is_enabled(Feature::BlobToc))
{
if let Some((_, blob_ctx)) = blob_mgr.get_current_blob() {
blob_ctx.write_tar_header(
blob_writer,
Expand Down

0 comments on commit bca1b8a

Please sign in to comment.