Merge pull request #6 from bitbybit/patch-1

Warning: opendir(path/to/dir): failed to open dir: No such file or directory
This commit is contained in:
Tom.C. 2014-02-02 13:07:18 -08:00
commit 98d96dabd3
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ $currentdir = GALLERY_ROOT . $thumbdir;
//-----------------------
$files = array();
$dirs = array();
if ($handle = opendir($currentdir))
if (is_directory($currentdir) && $handle = opendir($currentdir))
{
while (false !== ($file = readdir($handle)))
{