catalyst / moodle-tool_objectfs

Object file storage system for Moodle
https://moodle.org/plugins/tool_objectfs
88 stars 72 forks source link

Issue #609: When a file size is 0 bytes do not mark it as location error #612

Closed guillogo closed 3 months ago

guillogo commented 6 months ago

Hi all,

I have created this PR to fix issue #609.

When the file has a size of 0, readfile_allow_large and readfile will return 0. The code mistakenly treats it as false when validating if it succeeded or not.

Regards, Guillermo