mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
fix bug #1615: installer must create extension dir if it doesn't exist, patch by Tomas
This commit is contained in:
parent
37b73ad2d4
commit
9873fa5e42
@ -795,7 +795,14 @@ class PEAR_Installer extends PEAR_Downloader
|
||||
$this->raiseError("Extension '$_ext_name' already loaded. Please unload it ".
|
||||
"in your php.ini file prior to install or upgrade it.");
|
||||
}
|
||||
$dest = $this->config->get('ext_dir') . DIRECTORY_SEPARATOR . $bn;
|
||||
// extension dir must be created if it doesn't exist
|
||||
// patch by Tomas Cox (modified by Greg Beaver)
|
||||
$ext_dir = $this->config->get('ext_dir');
|
||||
if (!@is_dir($ext_dir) && !System::mkdir(array('-p', $ext_dir))) {
|
||||
$this->log(3, "+ mkdir -p $ext_dir");
|
||||
return $this->raiseError("failed to create extension dir '$ext_dir'");
|
||||
}
|
||||
$dest = $ext_dir . DIRECTORY_SEPARATOR . $bn;
|
||||
$this->log(1, "Installing '$bn' at ext_dir ($dest)");
|
||||
$this->log(3, "+ cp $ext[file] ext_dir ($dest)");
|
||||
$copyto = $this->_prependPath($dest, $this->installroot);
|
||||
|
Loading…
Reference in New Issue
Block a user