Explorar o código

Also try a php copy-and-remove on unix if mv failed, refs #1765

Jordi Boggiano %!s(int64=12) %!d(string=hai) anos
pai
achega
3ffad59719
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      src/Composer/Util/Filesystem.php

+ 1 - 3
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);
     }
 
     /**