From 382a7adeb755bad297c8129281fcd73a28b62c15 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Sun, 29 May 2005 17:29:44 +0000 Subject: - Let function 'openFileMaybeCompressed' and 'catMaybeCompressed' support file names with spaces (bug #16172). --- MDK/Common/File.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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])) } -- cgit v1.2.1