Clean up vendor dir after a package was removed

main
Jordi Boggiano 12 years ago committed by Nils Adermann
parent b84bcd84d6
commit 90732fd03f

@ -127,6 +127,13 @@ class LibraryInstaller implements InstallerInterface
$this->downloadManager->remove($package, $downloadPath);
$this->removeBinaries($package);
$repo->removePackage($package);
if (strpos($package->getName(), '/')) {
$packageVendorDir = dirname($downloadPath);
if (is_dir($packageVendorDir) && !glob($packageVendorDir.'/*')) {
@rmdir($packageVendorDir);
}
}
}
/**

Loading…
Cancel
Save