瀏覽代碼

fix race condition

Rob Bast 9 年之前
父節點
當前提交
64d653ad92
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/Composer/TestCase.php

+ 1 - 1
tests/Composer/TestCase.php

@@ -63,7 +63,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
 
         do {
             $unique = $root . DIRECTORY_SEPARATOR . uniqid('composer-test-');
-            if (!file_exists($unique) && mkdir($unique, 0777)) {
+            if (!file_exists($unique) && false !== @mkdir($unique, 0777)) {
                 return realpath($unique);
             }
         } while (--$attempts);