mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
Graceful fallback in Filesystem::removeDirectory() to php, if process failed.
This commit is contained in:
parent
e707dcd92f
commit
5f86037ff3
1 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue