浏览代码

Merge pull request #2405 from discordier/fix-upgrade-cache

Fix cache directory upgrading - do not try to (re)move the active cache dir.
Jordi Boggiano 11 年之前
父节点
当前提交
034ac85465
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/Composer/Factory.php

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