Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.2

Bug #16406 addReplacement does not look for files in packagedirectory
Submitted: 2009-07-05 18:58 UTC Modified: 2011-03-24 00:05 UTC
From: sunejensen Assigned: dufuz
Status: Closed Package: PEAR_PackageFileManager2 (version 1.0.0)
PHP Version: 5.2.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  



Patch look-in-packagedirectory Revisions
Revision 2009-07-05 19:00 UTC
Developer sunejensen
 
Download patch

*** /tmp/pear/download/PEAR_PackageFileManager2-1.0.0/PackageFileManager2.php	1970-01-01 10:13:24.000000000 +0100
--- /usr/share/php5/PEAR/PEAR/PackageFileManager2.php	2009-07-05 19:58:10.000000000 +0200
***************
*** 875,881 ****
--- 875,885 ----
                  implode(', ', $res[3]), $res[1] . ': ' . $res[2]);
          }
  
+         $current_dir = getcwd();
+         chdir($this->_options['packagedirectory']);
          $glob = defined('GLOB_BRACE') ? glob($path, GLOB_BRACE) : glob($path);
+         chdir($current_dir);
+         
          if (false !== $glob) {
              foreach ($glob as $pathItem) {
                  $this->_options['replacements'][$pathItem][] = $task;