From d4f326e7ce5b6fa49d07ac054ee633e25e4fd87d Mon Sep 17 00:00:00 2001 From: magdev Date: Mon, 3 Sep 2018 22:24:44 +0200 Subject: [PATCH] Fixed bug in copy from phar file method --- src/Service/PharHelperService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Service/PharHelperService.php b/src/Service/PharHelperService.php index 0a01dc5..783b445 100644 --- a/src/Service/PharHelperService.php +++ b/src/Service/PharHelperService.php @@ -130,7 +130,10 @@ class PharHelperService */ public function copy(string $source, string $target): bool { - return copy($this->getPharUrl($source), $target); + if ($this->isInPhar() && substr($source, 0, 4) !== 'phar') { + $source = $this->getPharUrl($source); + } + return copy($source, $target); }