diff --git a/includes/functions/functions_mediadb.php b/includes/functions/functions_mediadb.php
index <HASH>..<HASH> 100644
--- a/includes/functions/functions_mediadb.php
+++ b/includes/functions/functions_mediadb.php
@@ -923,7 +923,7 @@ function get_media_folders() {
 				$entry = $dir->read();
 				if (!$entry)
 					break;
-				if (is_dir($currentFolder . $entry . "/")) {
+				if (is_dir($currentFolder . $entry)) {
 					// Weed out some folders we're not interested in
 					if ($entry != "." && $entry != ".." && $entry != "CVS" && $entry != ".svn") {
 						if ($currentFolder . $entry . "/" != $MEDIA_DIRECTORY . "thumbs/") {
FIX: is_dir() gives error with badly-formed directories when open_basedir is in effect.