cvs: php-src /pear/PEAR Installer.php
| From: | Greg Beaver | Date: | Sat, 12 Jun 2004 05:48:10 +0000 |
| Subject: | cvs: php-src /pear/PEAR Installer.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-385@lists.php.net to get a copy of this message | ||
cellog Sat Jun 12 01:48:10 2004 EDT
Modified files:
/php-src/pear/PEAR Installer.php
Log:
fix bug #1615: installer must create extension dir if it doesn't exist, patch by Tomas
http://cvs.php.net/diff.php/php-src/pear/PEAR/Installer.php?r1=1.149&r2=1.150&ty=u
Index: php-src/pear/PEAR/Installer.php
diff -u php-src/pear/PEAR/Installer.php:1.149 php-src/pear/PEAR/Installer.php:1.150
--- php-src/pear/PEAR/Installer.php:1.149 Fri Apr 30 12:37:39 2004
+++ php-src/pear/PEAR/Installer.php Sat Jun 12 01:48:10 2004
@@ -18,7 +18,7 @@
// | Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Installer.php,v 1.149 2004/04/30 16:37:39 cellog Exp $
+// $Id: Installer.php,v 1.150 2004/06/12 05:48:10 cellog Exp $
require_once 'PEAR/Downloader.php';
@@ -795,7 +795,14 @@
$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);