Software /
code /
prosody-modules
Diff
mod_http_upload/mod_http_upload.lua @ 3588:85057c4e7b66
mod_http_upload: Consider quota reached if it can't be checked
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 08 May 2019 13:48:24 +0200 |
parent | 3549:b059a3fb2a58 |
child | 3589:dec5683f91a2 |
line wrap: on
line diff
--- a/mod_http_upload/mod_http_upload.lua Tue May 07 17:10:07 2019 +0200 +++ b/mod_http_upload/mod_http_upload.lua Wed May 08 13:48:24 2019 +0200 @@ -107,7 +107,11 @@ local function check_quota(username, host, does_it_fit) if not quota then return true; end local uploads, err = datamanager.list_load(username, host, module.name); - if not uploads then return true; end + if err then + return false; + elseif not uploads then + return true; + end local sum = does_it_fit or 0; for _, item in ipairs(uploads) do sum = sum + item.size;