From fbf9a27132f028ed2c25f1b76347552c8c598e66 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Mon, 19 Nov 2012 13:51:24 +0100 Subject: [PATCH] Works on Linux when proc_open misses --- src/Composer/Util/Filesystem.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Composer/Util/Filesystem.php b/src/Composer/Util/Filesystem.php index 90736995e..7a8982131 100644 --- a/src/Composer/Util/Filesystem.php +++ b/src/Composer/Util/Filesystem.php @@ -152,11 +152,11 @@ class Filesystem return; } - if (defined('PHP_WINDOWS_VERSION_BUILD')) { - if (!function_exists('proc_open')) { - return $this->copyThenRemove($source, $target); - } + if (!function_exists('proc_open')) { + return $this->copyThenRemove($source, $target); + } + if (defined('PHP_WINDOWS_VERSION_BUILD')) { // Try to copy & delete - this is a workaround for random "Access denied" errors. $command = sprintf('xcopy %s %s /E /I /Q', escapeshellarg($source), escapeshellarg($target)); if (0 === $this->processExecutor->execute($command)) {