From: Tomas V.V.Cox Date: Tue, 9 Apr 2002 13:49:47 +0000 (+0000) Subject: Fix package-list not showing the right Install path X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~770 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc811f3041200e28c29706c05a9bcfcf432b1e1e;p=php Fix package-list not showing the right Install path --- diff --git a/pear/PEAR/Command/Package.php b/pear/PEAR/Command/Package.php index cae9faffd7..63e5a59eae 100644 --- a/pear/PEAR/Command/Package.php +++ b/pear/PEAR/Command/Package.php @@ -160,7 +160,14 @@ class PEAR_Command_Package extends PEAR_Command_Common // {{{ package-list case 'package-list': { + // $params[0] -> the PEAR package to list its contents + if (sizeof($params) != 1) { + $failmsg = "Command package-list requires a valid PEAR package filename ". + " as the first argument. Try the command \"help package-list\""; + break; + } $obj = new PEAR_Common(); + if (PEAR::isError($info = $obj->infoFromTgzFile($params[0]))) { return $info; } @@ -173,9 +180,9 @@ class PEAR_Command_Package extends PEAR_Command_Common foreach ($list as $file => $att) { if (isset($att['baseinstalldir'])) { $dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR . - basename($file); + $file; } else { - $dest = basename($file); + $dest = $file; } switch ($att['role']) { case 'test':