Skip to content

Commit

Permalink
Merge branch 'm28_MDL-48799_Incorrect_Legacy_Dir_Fallback' of https:/…
Browse files Browse the repository at this point in the history
…/github.com/scara/moodle into MOODLE_28_STABLE
  • Loading branch information
danpoltawski committed Feb 3, 2015
2 parents 9e98e66 + 48a515c commit 45acb77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion file.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
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();
}
}
Expand Down

0 comments on commit 45acb77

Please sign in to comment.