Browse Source

fix directory existion check #2

main
ghost 12 months ago
parent
commit
17d6171d95
  1. 7
      src/webui/explore.php

7
src/webui/explore.php

@ -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, ['.', '..']))
{ {
@ -126,6 +130,7 @@ if ($config->snap->storage->local->enabled)
), ),
]; ];
} }
}
} }
/// Remote snaps /// Remote snaps

Loading…
Cancel
Save