From 99cca59d6e53584e8e72e64af4b205f9802bec07 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 21 Jul 2023 17:23:00 +0200 Subject: plugins: Handle how get_option_period returns "never" --- plugins/mod_http_file_share.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_http_file_share.lua') diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index 08d6a90e..a1c725f8 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -176,7 +176,7 @@ function get_authz(slot, uploader, filename, filesize, filetype) -- slot properties slot = slot; - expires = expiry >= 0 and (os.time()+expiry) or nil; + expires = expiry < math.huge and (os.time()+expiry) or nil; -- file properties filename = filename; filesize = filesize; -- cgit v1.2.3