summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/common.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 9b2ace894..9ed9012ff 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -115,7 +115,8 @@ sub unix2dos { local $_ = $_[0]; s/\015$//mg; s/$/\015/mg; $_ }
sub openFileMaybeCompressed {
my ($f) = @_;
-e $f || -e "$f.gz" or die "file $f not found";
- open F, -e $f ? $f : "gzip -dc $f.gz|";
+ local *F;
+ open F, -e $f ? $f : "gzip -dc $f.gz|" or die "file $f is not readable";
*F;
}
sub catMaybeCompressed { cat__(openFileMaybeCompressed($_[0])) }