From f46b5641b70bc1aa864fec7533891ffdb60f6225 Mon Sep 17 00:00:00 2001 From: "Tomas V.V.Cox" Date: Sun, 5 Oct 2003 19:10:56 +0000 Subject: [PATCH] use realpath instead of chdir (Roman Neuhauser ) --- pear/PEAR/Installer.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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; -- 2.40.0