aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http_file_share.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_http_file_share.lua')
-rw-r--r--plugins/mod_http_file_share.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index bec56cd5..4fc5a3b5 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -500,10 +500,6 @@ if expiry >= 0 and not external_base_url then
local deletion_query = {["end"] = boundary_time};
if not problem_deleting then
module:log("info", "All (%d, %s) expired files successfully deleted", n, B(size_sum));
- if total_storage_usage then
- total_storage_usage = total_storage_usage - size_sum;
- module:log("debug", "Global quota %s / %s", B(total_storage_usage), B(total_storage_limit));
- end
-- we can delete based on time
else
module:log("warn", "%d out of %d expired files could not be deleted", n-#obsolete_uploads, n);
@@ -511,10 +507,14 @@ if expiry >= 0 and not external_base_url then
-- successfully deleted, and then try again with the failed ones.
-- eventually the admin ought to notice and fix the permissions or
-- whatever the problem is.
- -- total_storage_limit will be inaccurate until this has been resolved
deletion_query = {ids = obsolete_uploads};
end
+ if total_storage_usage then
+ total_storage_usage = total_storage_usage - size_sum;
+ module:log("debug", "Global quota %s / %s", B(total_storage_usage), B(total_storage_limit));
+ end
+
if #obsolete_uploads == 0 then
module:log("debug", "No metadata to remove");
else