From 2d5d91c0d21055aefe3c8406ad45157479a7189a Mon Sep 17 00:00:00 2001 From: Tor Edvardsson Date: Tue, 28 Apr 2020 16:17:03 +0200 Subject: [PATCH] Cross platform detection of absolute path --- lib/PreProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PreProcessor.php b/lib/PreProcessor.php index e4dd405..bcdf102 100755 --- a/lib/PreProcessor.php +++ b/lib/PreProcessor.php @@ -225,7 +225,7 @@ private function resolveInclude(?Token $arg, string $contextFile): array { } private function findHeaderFile(string $header, string $contextDir, string $contextFile): string { - if ($header[0] === '/') { + if ($header[0] === '/' || ($header[1] === ':' && $header[2] === '\\')) { if (file_exists($header)) { return $header; }