aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index c66d7233..94b84867 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -423,12 +423,16 @@ if expiry >= 0 and not external_base_url then
deletion_query = {ids = obsolete_uploads};
end
- local removed, err = uploads:delete(nil, deletion_query);
-
- if removed == true or removed == n or removed == #obsolete_uploads then
- module:log("debug", "Removed all metadata for expired uploaded files");
+ if #obsolete_uploads == 0 then
+ module:log("debug", "No metadata to remove");
else
- module:log("error", "Problem removing metadata for deleted files: %s", err);
+ local removed, err = uploads:delete(nil, deletion_query);
+
+ if removed == true or removed == n or removed == #obsolete_uploads then
+ module:log("debug", "Removed all metadata for expired uploaded files");
+ else
+ module:log("error", "Problem removing metadata for deleted files: %s", err);
+ end
end
prune_done();