1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Maintain old behaviour when file does not exist

This commit is contained in:
Matt Brown 2020-10-25 16:38:58 -04:00 committed by Daniil Gentili
parent fcf8f442fd
commit 95b0d6da91
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -1303,7 +1303,7 @@ class Config
public function shortenFileName(string $to): string
{
if (!is_file($to)) {
return $to;
return preg_replace('/^' . preg_quote($this->base_dir, '/') . '/', '', $to);
}
$from = $this->base_dir;