Skip to content

Commit

Permalink
Merge pull request #14222 from adrianschroeter/fix-mediaType
Browse files Browse the repository at this point in the history
[backend] fix mediaType layer information
  • Loading branch information
adrianschroeter committed Apr 25, 2023
2 parents d6dd6c3 + 7db4567 commit b036a9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/backend/BSContar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ sub create_layer_data {
undef $lcomp;
}
my $layer_data = {
'mediaType' => $layer_ent->{'mimetype'} || ($oci ? ($newcomp eq 'zstd' ? $BSContar::mt_oci_zstd : $BSContar::mt_oci_gzip) : $BSContar::mt_docker_gzip),
'mediaType' => $layer_ent->{'mimetype'} || ($oci ? ($newcomp eq 'zstd' ? $BSContar::mt_oci_layer_zstd : $BSContar::mt_oci_layer_gzip) : $BSContar::mt_docker_layer_gzip),
'size' => $layer_ent->{'size'},
'digest' => $layer_ent->{'blobid'} || BSContar::blobid_entry($layer_ent),
};
Expand Down
2 changes: 1 addition & 1 deletion src/backend/BSPublisher/Containerinfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sub construct_container_tar {
$file = $fd;
}
die("missing blobid $blobid\n") unless -e $file;
push @tar, {'name' => $blobid, 'file' => $file, 'mtime' => $mtime, 'offset' => 0, 'size' => (-s $_), 'blobid' => $blobid};
push @tar, {'name' => $blobid, 'file' => $file, 'mtime' => $mtime, 'offset' => 0, 'size' => (-s _), 'blobid' => $blobid};
}
push @tar, {'name' => 'manifest.json', 'data' => $manifest, 'mtime' => $mtime, 'size' => length($manifest)};
return (\@tar, $mtime, $containerinfo->{'layer_compression'});
Expand Down

0 comments on commit b036a9e

Please sign in to comment.