Merge branch 'm29_MDL-48799_Incorrect_Legacy_Dir_Fallback' of https://github.com/scara/moodle

This commit is contained in:
Dan Poltawski
2015-02-03 13:13:13 +00:00
+2 -1
View File
@@ -87,7 +87,8 @@ if (!$file = $fs->get_file_by_hash(sha1($fullpath))) {
if (strrpos($fullpath, '/') !== strlen($fullpath) -1 ) {
$fullpath .= '/';
}
if (!$file = $fs->get_file_by_hash(sha1($fullpath.'/.'))) {
// Try to fallback to the directory named as the supposed file.
if (!$file = $fs->get_file_by_hash(sha1($fullpath.'.'))) {
send_file_not_found();
}
}