1
0
Fork 0

Clean up vendor dir after a package was removed

pull/667/head
Jordi Boggiano 2012-04-27 21:23:07 +02:00 committed by Nils Adermann
parent b84bcd84d6
commit 90732fd03f
1 changed files with 7 additions and 0 deletions

View File

@ -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);
}
}
}
/**