1
0
Fork 0

Fix cache blasting on nix

pull/1543/merge
Jordi Boggiano 2013-01-30 11:19:16 +01:00
parent 710f91c1e3
commit 49c839d780
1 changed files with 1 additions and 3 deletions

View File

@ -17,7 +17,6 @@ use Composer\Json\JsonFile;
use Composer\IO\IOInterface; use Composer\IO\IOInterface;
use Composer\Repository\ComposerRepository; use Composer\Repository\ComposerRepository;
use Composer\Repository\RepositoryManager; use Composer\Repository\RepositoryManager;
use Composer\Util\Filesystem;
use Composer\Util\ProcessExecutor; use Composer\Util\ProcessExecutor;
use Composer\Util\RemoteFilesystem; use Composer\Util\RemoteFilesystem;
use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Formatter\OutputFormatterStyle;
@ -87,7 +86,6 @@ class Factory
'cache-vcs-dir' => array('/cache.git' => '/*', '/cache.hg' => '/*'), 'cache-vcs-dir' => array('/cache.git' => '/*', '/cache.hg' => '/*'),
'cache-files-dir' => array('/cache.files' => '/*'), 'cache-files-dir' => array('/cache.files' => '/*'),
); );
$filesystem = new Filesystem();
foreach ($legacyPaths as $key => $oldPaths) { foreach ($legacyPaths as $key => $oldPaths) {
foreach ($oldPaths as $oldPath => $match) { foreach ($oldPaths as $oldPath => $match) {
$dir = $config->get($key); $dir = $config->get($key);
@ -107,7 +105,7 @@ class Factory
@rename($child, $dir.'/'.basename($child)); @rename($child, $dir.'/'.basename($child));
} }
} }
$filesystem->removeDirectory($oldPath); @rmdir($oldPath);
} }
} }
} }