Skip to content

Commit

Permalink
MDL-48799 Files API: fixed legacy directory fallback.
Browse files Browse the repository at this point in the history
  • Loading branch information
scara committed Feb 1, 2015
1 parent 4c27f52 commit 6c6147b
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 6c6147b

Please sign in to comment.