diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index d075da6d7..88bf58a0f 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/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) {