]> granicus.if.org Git - php/commitdiff
use realpath instead of chdir
authorTomas V.V.Cox <cox@php.net>
Sun, 5 Oct 2003 19:10:56 +0000 (19:10 +0000)
committerTomas V.V.Cox <cox@php.net>
Sun, 5 Oct 2003 19:10:56 +0000 (19:10 +0000)
(Roman Neuhauser <neuhauser@bellavista.cz>)

pear/PEAR/Installer.php

index a429d05b5e2ba99340323e940bf56b99aab954c6..19c8b67a327b14a158d14a2be3429584792bd5a4 100644 (file)
@@ -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;