1
0
Fork 0

Actually check for the dir existence before retrying, refs #4009

pull/4961/merge
Jordi Boggiano 2016-02-28 14:08:43 +00:00
parent c502601c4b
commit 070ee50693
1 changed files with 3 additions and 0 deletions

View File

@ -152,6 +152,9 @@ class Filesystem
// sometimes fails without apparent reason, see https://github.com/composer/composer/issues/4009
clearstatcache();
usleep(100000);
if (!is_dir($directory)) {
return true;
}
$it = new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS);
}
$ri = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);