# HG changeset patch # User Kim Alvefur # Date 1638515778 -3600 # Node ID 99be6874340b84d96733257be2e850757d469de9 # Parent 1ea01660c79a20e31c4ae6e324da493e81c5a70c mod_http_file_share: Fix measuring total storage use before it was known Passing nil to the metrics system causes errors later. diff -r 1ea01660c79a -r 99be6874340b plugins/mod_http_file_share.lua --- 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);