Commit 70325081 authored by Astor Bizard's avatar Astor Bizard
Browse files

Fixed subdirectories on archive submission.

parent 7cd51c5a
......@@ -91,6 +91,9 @@ if ($fromform = $mform->get_data()) {
// Read archive and split between required / additional files.
for ($i = 0; $i < $zip->numFiles; $i++) {
$filename = $zip->statIndex($i)['name'];
if (substr($filename, -1) == '/') { // Directory.
continue;
}
$filecontent = file_get_contents('zip://' . $zipname . '#' . $filename);
// Autodetect text file encode if not binary.
if (! vpl_is_binary( $filename )) {
......
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