Skip to content

Commit 58572a8

Browse files
committed
Finder: getType() replaced with isDir() / isFile()
- getType() throws an exception when the file (no longer) exists - there is a difference regarding handling of symlinks [#295]
1 parent 380966d commit 58572a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utils/Finder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ private function traverseDir(string $dir, array $searches, array $subdirs = []):
385385
$relativePathname = FileSystem::unixSlashes($file->getRelativePathname());
386386
foreach ($searches as $search) {
387387
if (
388-
$file->getType() === $search->mode
388+
$file->{'is' . $search->mode}()
389389
&& preg_match($search->pattern, $relativePathname)
390390
&& $this->proveFilters($this->filters, $file, $cache)
391391
) {

0 commit comments

Comments
 (0)