Skip to content

Commit

Permalink
Fix filesystem::copy with broken symlinks, refs #11864
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Mar 8, 2024
1 parent 299b2c1 commit 57427e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Composer/Util/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@ public function copyThenRemove(string $source, string $target)
*/
public function copy(string $source, string $target)
{
// refs https://github.com/composer/composer/issues/11864
$target = $this->normalizePath($target);

if (!is_dir($source)) {
return copy($source, $target);
}
Expand Down

0 comments on commit 57427e6

Please sign in to comment.