summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2004-06-12 05:48:10 +0000
committerGreg Beaver <cellog@php.net>2004-06-12 05:48:10 +0000
commit9873fa5e42c30f8c8d2fcd9c1ea00427d6c78a74 (patch)
treee5b8181d3fc6cc4b09041fc52a2fce509525084a /pear
parent37b73ad2d4b3c1222bd818ecbec6dfea8ae6454b (diff)
downloadphp-git-9873fa5e42c30f8c8d2fcd9c1ea00427d6c78a74.tar.gz
fix bug #1615: installer must create extension dir if it doesn't exist, patch by Tomas
Diffstat (limited to 'pear')
-rw-r--r--pear/PEAR/Installer.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php
index 0963dbd1f7..5b17826781 100644
--- a/pear/PEAR/Installer.php
+++ b/pear/PEAR/Installer.php
@@ -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);