# HG changeset patch # User Kim Alvefur # Date 1501166778 -7200 # Node ID b1c5b0c369c246498dd7d66f71f744374ee5a2ce # Parent d48faff92490e07cc986370f890e633b851f1910 mod_http_upload: Remove directory when deleting a file (fixes #950) diff -r d48faff92490 -r b1c5b0c369c2 mod_http_upload/mod_http_upload.lua --- a/mod_http_upload/mod_http_upload.lua Sat Jul 22 23:14:13 2017 +0200 +++ b/mod_http_upload/mod_http_upload.lua Thu Jul 27 16:46:18 2017 +0200 @@ -88,6 +88,7 @@ if not deleted then module:log("warn", "Could not delete expired upload %s: %s", filename, whynot or "delete failed"); end + os.remove(filename:match("^(.*)[/\\]")); return false; elseif item.time < upload_window and not lfs.attributes(filename) then return false; -- File was not uploaded or has been deleted since