diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2010-01-22 01:46:40 +0100 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2010-01-22 01:57:39 +0100 |
commit | efd281e8723f9e80e65cbdcefb304483c35ad963 (patch) | |
tree | 1728db46c84f4b87446afd867e621df9496c2908 /scripts/Dpkg/Compression/CompressedFile.pm | |
parent | c5fea0a576586e993ad8af3c6b2d0897297cd9f7 (diff) | |
download | dpkg-efd281e8723f9e80e65cbdcefb304483c35ad963.tar.gz |
Dpkg::Compression: new API based on public functions
This API change requires lots of adjustements through the source code.
Diffstat (limited to 'scripts/Dpkg/Compression/CompressedFile.pm')
-rw-r--r-- | scripts/Dpkg/Compression/CompressedFile.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/Dpkg/Compression/CompressedFile.pm b/scripts/Dpkg/Compression/CompressedFile.pm index 1a85ba059..ffa471eb9 100644 --- a/scripts/Dpkg/Compression/CompressedFile.pm +++ b/scripts/Dpkg/Compression/CompressedFile.pm @@ -291,7 +291,7 @@ sub set_filename { if (defined($add_comp_ext)) { *$self->{"add_comp_ext"} = $add_comp_ext; } - if (*$self->{"add_comp_ext"} and $filename =~ /\.$comp_regex$/) { + if (*$self->{"add_comp_ext"} and $filename =~ /\.$compression_re_file_ext$/) { warning("filename %s already has an extension of a compressed file " . "and add_comp_ext is active", $filename); } @@ -317,7 +317,8 @@ sub get_filename { } elsif ($comp eq "none") { return *$self->{"filename"}; } else { - return *$self->{"filename"} . "." . $comp_ext{$comp}; + return *$self->{"filename"} . "." . + compression_get_property($comp, "file_ext"); } } else { return *$self->{"filename"}; @@ -339,7 +340,7 @@ sub use_compression { if ($comp eq "none") { return 0; } elsif ($comp eq "auto") { - $comp = get_compression_from_filename($self->get_filename()); + $comp = compression_guess_from_filename($self->get_filename()); *$self->{"compressor"}->set_compression($comp) if $comp; } return $comp; |