From 42346ad837199309ff84a31a3bb72ef698ea868b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20M=C3=A1rton?= Date: Fri, 8 Mar 2013 15:31:00 +0100 Subject: [PATCH] Fix for ordering problem during package removal resulting dangling symlinks, partially fixes #1675 --- src/Composer/Installer/LibraryInstaller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index 5bbba4815..5ec3ccce0 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -227,7 +227,7 @@ class LibraryInstaller implements InstallerInterface } foreach ($binaries as $bin) { $link = $this->binDir.'/'.basename($bin); - if (file_exists($link)) { + if (is_link($link) || file_exists($link)) { unlink($link); } if (file_exists($link.'.bat')) {