mirror of
https://github.com/YGGverse/Yo.git
synced 2026-03-31 17:55:35 +00:00
fix directory existion check #2
This commit is contained in:
parent
100806af02
commit
17d6171d95
1 changed files with 16 additions and 11 deletions
|
|
@ -101,7 +101,11 @@ if ($config->snap->storage->local->enabled)
|
||||||
$prefix = __DIR__ . '/../../' . $config->snap->storage->local->directory;
|
$prefix = __DIR__ . '/../../' . $config->snap->storage->local->directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ((array) scandir(sprintf('%s/%s', $prefix, $filepath)) as $filename)
|
$directory = sprintf('%s/%s', $prefix, $filepath);
|
||||||
|
|
||||||
|
if (is_dir($directory))
|
||||||
|
{
|
||||||
|
foreach ((array) scandir($directory) as $filename)
|
||||||
{
|
{
|
||||||
if (in_array($filename, ['.', '..']))
|
if (in_array($filename, ['.', '..']))
|
||||||
{
|
{
|
||||||
|
|
@ -127,6 +131,7 @@ if ($config->snap->storage->local->enabled)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Remote snaps
|
/// Remote snaps
|
||||||
foreach ($config->snap->storage->remote->ftp as $i => $ftp)
|
foreach ($config->snap->storage->remote->ftp as $i => $ftp)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue