Browse Source

Fix for ordering problem during package removal resulting dangling symlinks, partially fixes #1675

Miklós Márton 12 năm trước cách đây
mục cha
commit
42346ad837
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Composer/Installer/LibraryInstaller.php

+ 1 - 1
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')) {