Browse Source

fix snap cleanup rules

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

12
src/cli/document/clean.php

@ -123,9 +123,17 @@ 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)
{ {
$snaps++; if (is_dir($filename) || is_link($filename) || str_starts_with($filename, '.') || !str_ends_with($filename, '.tar.gz'))
{
continue;
}
if (unlink($filename))
{
$snaps++;
}
} }
} }

Loading…
Cancel
Save