Filesystem: use fast operation first in emptyDirectory()
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…
Reference in New Issue