Filesystem: use fast operation first in emptyDirectory()

main
Markus Staab 4 years ago
parent de58c5499e
commit 6774e7ee29

@ -63,7 +63,7 @@ class Filesystem
public function emptyDirectory($dir, $ensureDirectoryExists = true)
{
if (file_exists($dir) && is_link($dir)) {
if (is_link($dir) && file_exists($dir)) {
$this->unlink($dir);
}
@ -600,7 +600,7 @@ class Filesystem
if (!function_exists('symlink')) {
return false;
}
$cwd = getcwd();
$relativePath = $this->findShortestPath($link, $target);

Loading…
Cancel
Save