Skip to content
Snippets Groups Projects
Commit e3a3ca0c authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fixed error in cache gc

parent b504ec20
No related branches found
No related tags found
2 merge requests!1502Development,!1486trying speed without pv
......@@ -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);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment