From b49e8fe865e6333bca1323cf5d9464de4bf540ef Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sun, 29 Feb 2004 15:58:17 +0000 Subject: [PATCH] Move the _prependPath function into PEAR_Downloader from PEAR_Installer, as PEAR_Downloader uses it (and PEAR_Installer inherits PEAR_Downloader). Unbreaks 'pear install -R' --- pear/PEAR/Downloader.php | 14 ++++++++++++++ pear/PEAR/Installer.php | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/pear/PEAR/Downloader.php b/pear/PEAR/Downloader.php index 9bdec76663..56182d2b66 100644 --- a/pear/PEAR/Downloader.php +++ b/pear/PEAR/Downloader.php @@ -612,6 +612,20 @@ class PEAR_Downloader extends PEAR_Common $this->ui->_downloadCallback($msg, $params); } + // }}} + // {{{ _prependPath($path, $prepend) + + function _prependPath($path, $prepend) + { + if (strlen($prepend) > 0) { + if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) { + $path = $prepend . substr($path, 2); + } else { + $path = $prepend . $path; + } + } + return $path; + } // }}} // {{{ pushError($errmsg, $code) diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index e68e634ea8..f998d4c751 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -539,21 +539,6 @@ class PEAR_Installer extends PEAR_Downloader return parent::mkDirHier($dir); } - // }}} - // {{{ _prependPath($path, $prepend) - - function _prependPath($path, $prepend) - { - if (strlen($prepend) > 0) { - if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) { - $path = $prepend . substr($path, 2); - } else { - $path = $prepend . $path; - } - } - return $path; - } - // }}} // {{{ download() -- 2.50.1