Просмотр исходного кода

Merge pull request #4441 from gsdevme/hotfix/ensure-the-directory-exists-before

Ensure the bin directory exists before checking empty
Jordi Boggiano 9 лет назад
Родитель
Сommit
1409e32037
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/Composer/Installer/LibraryInstaller.php

+ 1 - 1
src/Composer/Installer/LibraryInstaller.php

@@ -268,7 +268,7 @@ class LibraryInstaller implements InstallerInterface
         }
 
         // attempt removing the bin dir in case it is left empty
-        if ($this->filesystem->isDirEmpty($this->binDir)) {
+        if ((is_dir($this->binDir)) && ($this->filesystem->isDirEmpty($this->binDir))) {
             @rmdir($this->binDir);
         }
     }