1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Fix #1005 - resolve /./ to /

This commit is contained in:
Brown 2018-09-27 17:59:46 -04:00
parent 679f4894a9
commit ff893a3fb2

View File

@ -64,6 +64,7 @@ class IncludeChecker
}
if ($path_to_file) {
$path_to_file = str_replace('/./', '/', $path_to_file);
$slash = preg_quote(DIRECTORY_SEPARATOR, '/');
$reduce_pattern = '/' . $slash . '[^' . $slash . ']+' . $slash . '\.\.' . $slash . '/';