cvs: php4 /pear/PEAR Installer.php
| From: | Tomas V.V.Cox | Date: | Sat, 08 Jun 2002 17:34:47 +0000 |
| Subject: | cvs: php4 /pear/PEAR Installer.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4499@lists.php.net to get a copy of this message | ||
cox Sat Jun 8 13:34:47 2002 EDT
Modified files:
/php4/pear/PEAR Installer.php
Log:
Hopefully fixed a couple of problems with destination paths:
- Bug #17529
- In Windows getting <pear>\/\<file>
- Documentation under <doc_dir>/Package/Package/
# Please test it and report possible problem
Index: php4/pear/PEAR/Installer.php
diff -u php4/pear/PEAR/Installer.php:1.66 php4/pear/PEAR/Installer.php:1.67
--- php4/pear/PEAR/Installer.php:1.66 Thu Jun 6 06:51:26 2002
+++ php4/pear/PEAR/Installer.php Sat Jun 8 13:34:46 2002
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Installer.php,v 1.66 2002/06/06 10:51:26 ssb Exp $
+// $Id: Installer.php,v 1.67 2002/06/08 17:34:46 cox Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Registry.php';
@@ -164,7 +164,8 @@
case 'data':
case 'test':
$dest_dir = $this->config->get($atts['role'] . '_dir') .
- DIRECTORY_SEPARATOR . $this->pkginfo['package'];
+ DIRECTORY_SEPARATOR . $this->pkginfo['package'];
+ unset($atts['baseinstalldir']);
break;
case 'ext':
case 'php':
@@ -183,7 +184,7 @@
if (!empty($atts['baseinstalldir'])) {
$dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir'];
}
- if (dirname($file) != '.' && empty($atts['install-as'])
&& empty($atts['baseinstalldir'])) {
+ if (dirname($file) != '.' && empty($atts['install-as'])) {
$dest_dir .= DIRECTORY_SEPARATOR . dirname($file);
}
if (empty($atts['install-as'])) {
@@ -191,7 +192,10 @@
} else {
$dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as'];
}
- $dest_file = preg_replace('!//+!', '/', $dest_file);
+ $ds2 = str_repeat(DIRECTORY_SEPARATOR, 2);
+ $dest_file = preg_replace(array('!\\\\!', '!/!', "!$ds2+!"),
+ DIRECTORY_SEPARATOR,
+ $dest_file);
$dest_dir = dirname($dest_file);
if (!@is_dir($dest_dir)) {
if (!$this->mkDirHier($dest_dir)) {
@@ -572,7 +576,7 @@
function _buildCallback($what, $data)
{
switch ($what) {
-
+
}
if (($what == 'cmdoutput' && $this->debug > 1) ||
($what == 'output' && $this->debug > 0)) {