diff --git a/extensions/composer/Installer.php b/extensions/composer/Installer.php index d8d799f..fb66d16 100644 --- a/extensions/composer/Installer.php +++ b/extensions/composer/Installer.php @@ -113,10 +113,11 @@ class Installer extends LibraryInstaller $path = $this->vendorDir . '/' . $package->getName() . '/' . $path; } $path = $fs->normalizePath($path); + $targetDir = $package->getTargetDir(); if (strpos($path . '/', $vendorDir . '/') === 0) { - $aliases["@$name"] = '' . substr($path, strlen($vendorDir)) . '/' . $name; + $aliases["@$name"] = '' . ($targetDir === null ? '': '/' . $targetDir) . substr($path, strlen($vendorDir)); } else { - $aliases["@$name"] = $path . '/' . $name; + $aliases["@$name"] = $path . ($targetDir === null ? '': '/' . $targetDir); } } return $aliases;