Software / code / prosody
Changeset
11499:a8cbbbb1f165
mod_http_file_share: Fix logging of error opening file
It's annoying that Lua interpolates the filename into the error message.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 05 Apr 2021 16:23:59 +0200 |
| parents | 11498:d61ec5e6ee16 |
| children | 11500:21706a581b8a |
| files | plugins/mod_http_file_share.lua |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http_file_share.lua Thu Mar 25 13:18:23 2021 +0100 +++ b/plugins/mod_http_file_share.lua Mon Apr 05 16:23:59 2021 +0200 @@ -342,7 +342,7 @@ local filename = get_filename(slot_id); local handle, ferr = io.open(filename); if not handle then - module:log("error", "Could not open file: %s", filename, ferr); + module:log("error", "Could not open file for reading: %s", ferr); -- This can be because the upload slot wasn't used, or the file disappeared -- somehow, or permission issues. return 410;