Skip to content

Commit

Permalink
Do not call realpath on root when inside a phar
Browse files Browse the repository at this point in the history
  • Loading branch information
PeeHaa authored and kelunik committed Apr 9, 2018
1 parent 8d7ef9f commit 47a2015
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/DocumentRoot.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ public function __construct(string $root, File\Driver $filesystem = null) {
);
}

$this->root = \rtrim(\realpath($root), "/");
if (\strncmp($root, "phar://", 7) !== 0) {
$root = \realpath($root);
}

$this->root = \rtrim($root, "/");
$this->filesystem = $filesystem ?: File\filesystem();
$this->multipartBoundary = \uniqid("", true);
}
Expand Down

0 comments on commit 47a2015

Please sign in to comment.