summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-08-07 14:59:35 +0000
committerFrancois Pons <fpons@mandriva.com>2002-08-07 14:59:35 +0000
commita42d49f704cc6b06602afacdd6be0ae1589f9ba9 (patch)
tree69d4414cbc581e65e4b4058e86f7aae447c3d615 /perl-install/install_any.pm
parent779df8cedf13e9e1b8a76071783c8ee76256fe5e (diff)
downloaddrakx-a42d49f704cc6b06602afacdd6be0ae1589f9ba9.tar
drakx-a42d49f704cc6b06602afacdd6be0ae1589f9ba9.tar.gz
drakx-a42d49f704cc6b06602afacdd6be0ae1589f9ba9.tar.bz2
drakx-a42d49f704cc6b06602afacdd6be0ae1589f9ba9.tar.xz
drakx-a42d49f704cc6b06602afacdd6be0ae1589f9ba9.zip
getAndSaveFile now return before writing zero-length file if input file doesn't
exists on invocation.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 6cee89be3..16884f2c1 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -133,9 +133,9 @@ sub getFile {
}
sub getAndSaveFile {
my ($file, $local) = @_ == 1 ? ("Mandrake/mdkinst$_[0]", $_[0]) : @_;
- local *F; open F, ">$local" or return;
local $/ = \ (16 * 1024);
my $f = ref($file) ? $file : getFile($file) or return;
+ local *F; open F, ">$local" or return;
local $_;
while (<$f>) { syswrite F, $_ }
1;