소스 검색

Merge pull request #95 from henrikbjorn/autoload-relative

AutoloadGenerator.php miscalculates the path
Jordi Boggiano 13 년 전
부모
커밋
59206e1a11
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/Composer/Autoload/AutoloadGenerator.php

+ 3 - 2
src/Composer/Autoload/AutoloadGenerator.php

@@ -111,11 +111,12 @@ EOF;
             foreach ($package->getAutoload() as $type => $mapping) {
                 foreach ($mapping as $namespace => $path) {
                     $autoloads[$type][] = array(
-                        'namespace'   => $namespace,
-                        'path'      => $installPath.'/'.$path,
+                        'namespace' => $namespace,
+                        'path'      => empty($installPath) ? $path : $installPath.'/'.$path,
                     );
                 }
             }
+
         }
 
         foreach ($autoloads as $type => $maps) {