Mercurial > prosody-modules
changeset 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 |
parents | c24d43ababc6 |
children | dec5683f91a2 |
files | mod_http_upload/mod_http_upload.lua |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
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;