From de641f6e24df2f835f17f62c40bd0e29f269d1bb Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 5 Apr 2021 16:23:59 +0200 Subject: mod_http_file_share: Fix logging of error opening file It's annoying that Lua interpolates the filename into the error message. --- plugins/mod_http_file_share.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index c71639ab..74c97a1b 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -342,7 +342,7 @@ function handle_download(event, path) -- GET /uploads/:slot+filename 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; -- cgit v1.2.3