From 5b7e39e9198bf66f80933c669db716dcb5600c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=BChn?= Date: Mon, 7 Apr 2014 14:57:45 +0200 Subject: [PATCH] fixed: dead symlink breaks gc --- src/Composer/Cache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Cache.php b/src/Composer/Cache.php index 6fe01702b..f8d64cae1 100644 --- a/src/Composer/Cache.php +++ b/src/Composer/Cache.php @@ -151,14 +151,14 @@ class Cache $finder = $this->getFinder()->date('until '.$expire->format('Y-m-d H:i:s')); foreach ($finder as $file) { - unlink($file->getRealPath()); + unlink($file->getPathname()); } $totalSize = $this->filesystem->size($this->root); if ($totalSize > $maxSize) { $iterator = $this->getFinder()->sortByAccessedTime()->getIterator(); while ($totalSize > $maxSize && $iterator->valid()) { - $filepath = $iterator->current()->getRealPath(); + $filepath = $iterator->current()->getPathname(); $totalSize -= $this->filesystem->size($filepath); unlink($filepath); $iterator->next();