summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2005-05-29 17:29:44 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2005-05-29 17:29:44 +0000
commit382a7adeb755bad297c8129281fcd73a28b62c15 (patch)
tree9c23c288afcb64db113c3828a488951aab859b2f
parentc8352a86a1ec1fe70ffd3b852463b1a4c9be73d0 (diff)
downloadperl-MDK-Common-382a7adeb755bad297c8129281fcd73a28b62c15.tar
perl-MDK-Common-382a7adeb755bad297c8129281fcd73a28b62c15.tar.gz
perl-MDK-Common-382a7adeb755bad297c8129281fcd73a28b62c15.tar.bz2
perl-MDK-Common-382a7adeb755bad297c8129281fcd73a28b62c15.tar.xz
perl-MDK-Common-382a7adeb755bad297c8129281fcd73a28b62c15.zip
- Let function 'openFileMaybeCompressed' and 'catMaybeCompressed' support
file names with spaces (bug #16172).
-rw-r--r--MDK/Common/File.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/MDK/Common/File.pm b/MDK/Common/File.pm
index bb994fb..a1f55d1 100644
--- a/MDK/Common/File.pm
+++ b/MDK/Common/File.pm
@@ -309,7 +309,7 @@ sub expand_symlinks {
sub openFileMaybeCompressed {
my ($f) = @_;
-e $f || -e "$f.gz" or die "file $f not found";
- open(my $F, -e $f ? $f : "gzip -dc $f.gz|") or die "file $f is not readable";
+ open(my $F, -e $f ? $f : "gzip -dc \'$f.gz\'|") or die "file $f is not readable";
$F;
}
sub catMaybeCompressed { cat__(openFileMaybeCompressed($_[0])) }