Skip to content

Commit

Permalink
Merge pull request #10441 from rarila/patch-1
Browse files Browse the repository at this point in the history
Fix POSIX only detection of absolute paths
  • Loading branch information
orklah committed Dec 2, 2023
2 parents 0659967 + 59fd539 commit bcb73f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Psalm/Config/FileFilter.php
Expand Up @@ -7,6 +7,7 @@
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use SimpleXMLElement;
use Symfony\Component\Filesystem\Path;

use function array_filter;
use function array_map;
Expand Down Expand Up @@ -127,7 +128,7 @@ public static function loadFromArray(
$resolve_symlinks = (bool) ($directory['resolveSymlinks'] ?? false);
$declare_strict_types = (bool) ($directory['useStrictTypes'] ?? false);

if ($directory_path[0] === '/' && DIRECTORY_SEPARATOR === '/') {
if (Path::isAbsolute($directory_path)) {
/** @var non-empty-string */
$prospective_directory_path = $directory_path;
} else {
Expand Down

0 comments on commit bcb73f2

Please sign in to comment.