1
0
Fork 0

Merge remote-tracking branch 'johnstevenson/unlink-fix-2'

pull/1537/merge
Jordi Boggiano 2013-01-28 18:10:07 +01:00
commit 16a9839688
1 changed files with 3 additions and 1 deletions

View File

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