From decfb609abcb7f8289089029dadf3d24238b055b Mon Sep 17 00:00:00 2001 From: Svein-Tore Griff With Date: Wed, 16 Jan 2013 22:00:12 +0100 Subject: [PATCH] Ignore files starting with . or _ --- h5p.classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 5050639..1364699 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -222,7 +222,7 @@ class h5pValidator { $mainH5pExists = $imageExists = $contentExists = FALSE; foreach ($files as $file) { // TODO: Any reason not to just drop anything starting with .? - if (in_array($file, array('.', '..'))) { + if (in_array(substr($file, 0, 1), array('.', '_'))) { continue; } $file_path = $tmp_dir . DIRECTORY_SEPARATOR . $file;