diff --git a/index.php b/index.php index e67ffac..62be6eb 100644 --- a/index.php +++ b/index.php @@ -57,6 +57,8 @@ if (isset($_SESSION[$cdir]) $rmdirs[] = '.'; $rmdirs[] = '..'; $files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs); + // Filter Unsupported Files + $files = array_values(preg_grep('/.*\.(?!(webm|sh)).*/i', $files)); $_SESSION[$cdir]['f'] = $files; $_SESSION[$cdir]['d'] = $dirs; $_SESSION[$cdir]['t'] = time();