Commit 6891dd3f authored by lechuckdapirate's avatar lechuckdapirate

A bug made folders appear as 'ghost' games...

parent 2908764d
......@@ -116,7 +116,8 @@ $games=Array();
$h=opendir("games/thumbs");
while($file=readdir($h)) {
$game=Array();
if($file!='.' && $file!='..' && !strstr($file,'txt') ) {
// LeChuckdaPirate added "is_file" so folders don't be taken as games...
if(is_file("games/thumbs/$file") && $file!='.' && $file!='..' && !strstr($file,'txt') ) {
if(file_exists("games/thumbs/$file".'.txt')) {
$fp = fopen("games/thumbs/$file".'.txt',"rb");
$data = fread($fp,filesize("games/thumbs/$file".'.txt'));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment