Browse Source

Fix directory handling when auto-loading files.

Taylor Otwell 12 years ago
parent
commit
a834efe7c9
1 changed files with 1 additions and 5 deletions
  1. 1 5
      src/Composer/Autoload/AutoloadGenerator.php

+ 1 - 5
src/Composer/Autoload/AutoloadGenerator.php

@@ -127,11 +127,7 @@ EOF;
         $filesCode = "";
         $autoloads['files'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['files']));
         foreach ($autoloads['files'] as $functionFile) {
-            if (!$filesystem->isAbsolutePath($functionFile)) {
-                $functionFile = getcwd() . '/'. $functionFile;
-            }
-
-            $filesCode .= '    require __DIR__ . '. var_export('/'.$filesystem->findShortestPath($vendorPath, $functionFile), true).";\n";
+            $filesCode .= '    require '.$this->getPathCode($filesystem, $relVendorPath, $vendorPath, $functionFile).";\n";
         }
 
         file_put_contents($targetDir.'/autoload_namespaces.php', $namespacesFile);