Fix bug of download tries when a local file is given

to install
This commit is contained in:
Tomas V.V.Cox 2003-09-11 13:36:59 +00:00
parent a344aabb19
commit dfcd61cef7

View File

@ -648,10 +648,12 @@ class PEAR_Installer extends PEAR_Common
continue;
}
}
$pkgfile = $this->_downloadFile($pkgfile, $config, $options, $errors,
$version, $origpkgfile, $state);
if (PEAR::isError($pkgfile)) {
return $pkgfile;
if (!@is_file($pkgfile)) {
$pkgfile = $this->_downloadFile($pkgfile, $config, $options, $errors,
$version, $origpkgfile, $state);
if (PEAR::isError($pkgfile)) {
return $pkgfile;
}
}
$tempinfo = $this->infoFromAny($pkgfile);
if (isset($options['alldeps']) || isset($options['onlyreqdeps'])) {
@ -661,7 +663,7 @@ class PEAR_Installer extends PEAR_Common
}
}
$installpackages[] = array('pkg' => $tempinfo['package'],
'file' => $pkgfile, 'info' => $tempinfo);
'file' => $pkgfile, 'info' => $tempinfo);
}
// extract dependencies from downloaded files and then download them