mod_http_file_share: Fix measuring total storage use before it was known
Passing nil to the metrics system causes errors later.
--- a/plugins/mod_http_file_share.lua Fri Dec 03 01:02:02 2021 +0100
+++ b/plugins/mod_http_file_share.lua Fri Dec 03 08:16:18 2021 +0100
@@ -78,7 +78,7 @@
module:hook_global("stats-update", function ()
measure_upload_cache_size(upload_cache:count());
measure_quota_cache_size(quota_cache:count());
- if total_storage_limit then
+ if total_storage_limit and total_storage_usage then
measure_total_storage_usage(total_storage_usage);
end
end);