Просмотр исходного кода

Dpkg::Source::CompressedFile::cleanup_after_open(): fix error message

The $compressor->{cmdline} variable is removed by
$compressor->wait_end_process() so store it first in case we have to
display an error message.
Raphael Hertzog лет назад: 17
Родитель
Сommit
f49da9f283
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      scripts/Dpkg/Source/CompressedFile.pm

+ 2 - 1
scripts/Dpkg/Source/CompressedFile.pm

@@ -138,10 +138,11 @@ sub open_for_read {
 
 sub cleanup_after_open {
     my ($self) = @_;
+    my $cmdline = $self->{"compressor"}{"cmdline"} || "";
     $self->{"compressor"}->wait_end_process(nocheck => $self->{'allow_sigpipe'});
     if ($self->{'allow_sigpipe'}) {
         unless (($? == 0) || (WIFSIGNALED($?) && (WTERMSIG($?) == SIGPIPE))) {
-            subprocerr($self->{"compressor"}{"cmdline"});
+            subprocerr($cmdline);
         }
     }
 }