Commit e3a3ca0c authored by Dominik Hebeler's avatar Dominik Hebeler

fixed error in cache gc

parent b504ec20
......@@ -48,11 +48,11 @@ class CacheGC extends Command
}
try {
$iterator = new \RecursiveDirectoryIterator($cachedir);
$iterator->setFlags(\RecursiveDirectoryIterator::SKIP_DOTS);
$files = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
foreach ($files as $file) {
$file = realpath($file);
foreach (new \DirectoryIterator($cachedir) as $fileInfo) {
if ($fileInfo->isDot()) {
continue;
}
$file = $fileInfo->getPathname();
$basename = basename($file);
if (!is_dir($file) && $basename !== "cache.gc" && $basename !== ".gitignore") {
$fp = fopen($file, 'r');
......@@ -80,5 +80,6 @@ class CacheGC extends Command
} finally {
unlink($lockfile);
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment