1
0
Fork 0

Merge pull request #2985 from tristanlins/hotfix/filesystem-remove-directory

Graceful fallback in Filesystem::removeDirectory() to php
pull/1862/merge
Jordi Boggiano 2014-05-24 22:55:17 +02:00
commit 43a72d1132
1 changed files with 7 additions and 3 deletions

View File

@ -85,10 +85,14 @@ class Filesystem
$result = $this->getProcess()->execute($cmd, $output) === 0; $result = $this->getProcess()->execute($cmd, $output) === 0;
if ($result) {
// clear stat cache because external processes aren't tracked by the php stat cache // clear stat cache because external processes aren't tracked by the php stat cache
clearstatcache(); clearstatcache();
return $result && !is_dir($directory); return !is_dir($directory);
}
return $this->removeDirectoryPhp($directory);
} }
/** /**