Ignore files starting with . or _

namespaces
Svein-Tore Griff With 2013-01-16 22:00:12 +01:00
parent 2d3abae249
commit decfb609ab
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ class h5pValidator {
$mainH5pExists = $imageExists = $contentExists = FALSE; $mainH5pExists = $imageExists = $contentExists = FALSE;
foreach ($files as $file) { foreach ($files as $file) {
// TODO: Any reason not to just drop anything starting with .? // TODO: Any reason not to just drop anything starting with .?
if (in_array($file, array('.', '..'))) { if (in_array(substr($file, 0, 1), array('.', '_'))) {
continue; continue;
} }
$file_path = $tmp_dir . DIRECTORY_SEPARATOR . $file; $file_path = $tmp_dir . DIRECTORY_SEPARATOR . $file;