1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Fix POSIX only detection of absolute paths

This commit is contained in:
rarila 2023-12-01 18:01:57 +01:00 committed by GitHub
parent f9f8bacdf1
commit 59fd539ab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ use Psalm\Exception\ConfigException;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use SimpleXMLElement;
use Symfony\Component\Filesystem\Path;
use function array_filter;
use function array_map;
@ -127,7 +128,7 @@ class FileFilter
$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 {