mirror of
https://github.com/YGGverse/Yo.git
synced 2025-02-04 19:04:24 +00:00
fix snap cleanup rules
This commit is contained in:
parent
c618714cd2
commit
587fa26027
@ -123,9 +123,17 @@ foreach ($config->cli->document->crawl->skip->stripos->url as $condition)
|
||||
|
||||
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…
x
Reference in New Issue
Block a user