Skip to content

Commit

Permalink
Minor fixes around parse_url() checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Oct 22, 2024
1 parent 30fc45a commit 57c8294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe
$this->mkdir(\dirname($targetFile));

$doCopy = true;
if (!$overwriteNewerFiles && null === parse_url($originFile, \PHP_URL_HOST) && is_file($targetFile)) {
if (!$overwriteNewerFiles && !parse_url($originFile, \PHP_URL_HOST) && is_file($targetFile)) {
$doCopy = filemtime($originFile) > filemtime($targetFile);
}

Expand Down

0 comments on commit 57c8294

Please sign in to comment.