1
0
Fork 0

Merge pull request #9615 from clxmstaab/is-dir

Filesystem: use is_dir() instead of file_exists() which is faster
pull/9618/head
Jordi Boggiano 2021-01-17 14:59:52 +01:00 committed by GitHub
commit 09bf5ec85c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class Filesystem
// clear stat cache because external processes aren't tracked by the php stat cache
clearstatcache();
if ($result && !file_exists($directory)) {
if ($result && !is_dir($directory)) {
return true;
}
@ -600,7 +600,7 @@ class Filesystem
if (!function_exists('symlink')) {
return false;
}
$cwd = getcwd();
$relativePath = $this->findShortestPath($link, $target);