Skip to content

Commit b575e7c

Browse files
committed
Finder: is_file() does not work with symlinks under Windows
1 parent 3b60d70 commit b575e7c

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
@@ -387,7 +387,7 @@ private function traverseDir(string $dir, array $searches, array $subdirs = []):
387387
$relativePathname = FileSystem::unixSlashes($file->getRelativePathname());
388388
foreach ($searches as $search) {
389389
if (
390-
$file->{'is' . $search->mode}()
390+
"is_$search->mode"(Helpers::IsWindows && $file->isLink() ? $file->getLinkTarget() : $file->getPathname())
391391
&& preg_match($search->pattern, $relativePathname)
392392
&& $this->proveFilters($this->filters, $file, $cache)
393393
) {

0 commit comments

Comments
 (0)