diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index baa3dfa8dd89..ad0aae983bb4 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -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); }