|
|
|
@ -89,19 +89,23 @@ $filepath = implode(
@@ -89,19 +89,23 @@ $filepath = implode(
|
|
|
|
|
/// Local snaps |
|
|
|
|
if ($config->snap->storage->local->enabled) |
|
|
|
|
{ |
|
|
|
|
/// absolute |
|
|
|
|
if ('/' === substr($config->snap->storage->local->directory, 0, 1)) |
|
|
|
|
{ |
|
|
|
|
$prefix = $config->snap->storage->local->directory; |
|
|
|
|
} |
|
|
|
|
/// absolute |
|
|
|
|
if ('/' === substr($config->snap->storage->local->directory, 0, 1)) |
|
|
|
|
{ |
|
|
|
|
$prefix = $config->snap->storage->local->directory; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// relative |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$prefix = __DIR__ . '/../../' . $config->snap->storage->local->directory; |
|
|
|
|
} |
|
|
|
|
/// relative |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$prefix = __DIR__ . '/../../' . $config->snap->storage->local->directory; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$directory = sprintf('%s/%s', $prefix, $filepath); |
|
|
|
|
|
|
|
|
|
foreach ((array) scandir(sprintf('%s/%s', $prefix, $filepath)) as $filename) |
|
|
|
|
if (is_dir($directory)) |
|
|
|
|
{ |
|
|
|
|
foreach ((array) scandir($directory) as $filename) |
|
|
|
|
{ |
|
|
|
|
if (in_array($filename, ['.', '..'])) |
|
|
|
|
{ |
|
|
|
@ -126,6 +130,7 @@ if ($config->snap->storage->local->enabled)
@@ -126,6 +130,7 @@ if ($config->snap->storage->local->enabled)
|
|
|
|
|
), |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Remote snaps |
|
|
|
|