From 3ffad59719bd94987813ea1872001619200c24a0 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 25 Jul 2013 18:02:01 +0200 Subject: [PATCH] Also try a php copy-and-remove on unix if mv failed, refs #1765 --- src/Composer/Util/Filesystem.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index 475e77a6e..3dade2ce9 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -169,8 +169,6 @@ class Filesystem return; } - - return $this->copyThenRemove($source, $target); } else { // We do not use PHP's "rename" function here since it does not support // the case where $source, and $target are located on different partitions. @@ -185,7 +183,7 @@ class Filesystem } } - throw new \RuntimeException(sprintf('Could not rename "%s" to "%s".', $source, $target)); + return $this->copyThenRemove($source, $target); } /**