From fc4cc79a525fa7e36089625c35a727b4957cd3bf Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 7 Nov 2013 23:33:38 +0100 Subject: [PATCH] Fix cache directory upgrading - do not try to remove the destination directory. --- src/Composer/Factory.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index 99b5a692b..38949c7b6 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -118,7 +118,9 @@ class Factory @rename($child, $dir.'/'.basename($child)); } } - @rmdir($oldPath); + if ($config->get('cache-dir') != $oldPath) { + @rmdir($oldPath); + } } } }