mirror of
https://github.com/YGGverse/Yo.git
synced 2025-01-13 16:27:54 +00:00
fix snaps filename selection
This commit is contained in:
parent
f25de548b2
commit
22156d230d
@ -125,7 +125,7 @@ foreach ($config->cli->document->crawl->skip->stripos->url as $condition)
|
||||
{
|
||||
foreach ((array) scandir($location) as $filename)
|
||||
{
|
||||
if (is_dir($filename) || is_link($filename) || str_starts_with($filename, '.') || !str_ends_with($filename, '.tar.gz'))
|
||||
if (!str_ends_with($filename, '.tar.gz'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ function getLastSnapTime(array $files): int
|
||||
|
||||
foreach ($files as $file)
|
||||
{
|
||||
if (is_dir($file) || is_link($file) || str_starts_with($file, '.'))
|
||||
if (!str_ends_with($filename, '.tar.gz'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ if ($config->snap->storage->local->enabled)
|
||||
{
|
||||
foreach ((array) scandir($directory) as $filename)
|
||||
{
|
||||
if (is_dir($filename) || is_link($filename) || str_starts_with($filename, '.'))
|
||||
if (!str_ends_with($filename, '.tar.gz'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -164,7 +164,7 @@ foreach ($config->snap->storage->remote->ftp as $i => $ftp)
|
||||
|
||||
foreach ((array) $remote->nlist($filepath) as $filename)
|
||||
{
|
||||
if (is_dir($filename) || is_link($filename) || str_starts_with($filename, '.'))
|
||||
if (!str_ends_with($filename, '.tar.gz'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user