From: Tomas V.V.Cox Date: Sun, 5 Oct 2003 19:10:56 +0000 (+0000) Subject: use realpath instead of chdir X-Git-Tag: RELEASE_1_3b3~120 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f46b5641b70bc1aa864fec7533891ffdb60f6225;p=php use realpath instead of chdir (Roman Neuhauser ) --- diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index a429d05b5e..19c8b67a32 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -957,11 +957,7 @@ class PEAR_Installer extends PEAR_Common // {{{ Decompress pack in tmp dir ------------------------------------- // To allow relative package file names - $oldcwd = getcwd(); - if (@chdir(dirname($pkgfile))) { - $pkgfile = getcwd() . DIRECTORY_SEPARATOR . basename($pkgfile); - chdir($oldcwd); - } + $pkgfile = realpath($pkgfile); if (PEAR::isError($tmpdir = System::mktemp('-d'))) { return $tmpdir;