1
0
Fork 0

Fix filesystem::copy with broken symlinks, refs #11864

pull/11880/head
Jordi Boggiano 2024-03-08 10:44:47 +01:00
parent 299b2c1f2d
commit 57427e6227
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 0 deletions

View File

@ -363,6 +363,9 @@ class Filesystem
*/ */
public function copy(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)) { if (!is_dir($source)) {
return copy($source, $target); return copy($source, $target);
} }