MDL-54584 repository: Set a default filename in prepare_file

This commit is contained in:
Andrew Nicols 2016-05-16 11:07:38 +08:00
parent 65cbefc403
commit 388a8dbc4f

View File

@ -1617,6 +1617,9 @@ abstract class repository implements cacheable_object {
* @return file path
*/
public function prepare_file($filename) {
if (empty($filename)) {
$filename = 'file';
}
return sprintf('%s/%s', make_request_directory(), $filename);
}