Browse Source

fix snap cleanup rules

main
yggverse 8 months ago
parent
commit
587fa26027
  1. 10
      src/cli/document/clean.php

10
src/cli/document/clean.php

@ -123,11 +123,19 @@ foreach ($config->cli->document->crawl->skip->stripos->url as $condition)
if (is_dir($location)) if (is_dir($location))
{ {
if (rmdir($location)) foreach ((array) scandir($location) as $filename)
{
if (is_dir($filename) || is_link($filename) || str_starts_with($filename, '.') || !str_ends_with($filename, '.tar.gz'))
{
continue;
}
if (unlink($filename))
{ {
$snaps++; $snaps++;
} }
} }
}
$documents++; $documents++;

Loading…
Cancel
Save