Skip to content

Commit

Permalink
[backend] BSContar::create_layer_data: do not change the compression …
Browse files Browse the repository at this point in the history
…if the mime type is set
  • Loading branch information
mlschroe committed Apr 24, 2023
1 parent 5dad1a7 commit 2d0c8e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/backend/BSContar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ sub create_layer_data {
my ($layer_ent, $oci, $comp, $newcomp, $lcomp) = @_;
$comp ||= detect_entry_compression($layer_ent);
$newcomp ||= $oci && $comp eq 'zstd' ? 'zstd' : 'gzip';
$newcomp = $comp if $layer_ent->{'mimetype'}; # do not change the compression if the mime type is already set
if ($comp ne $newcomp) {
if ($comp) {
print "recompressing $layer_ent->{'name'}... ";
Expand Down

0 comments on commit 2d0c8e5

Please sign in to comment.