Software /
code /
prosody-modules
Changeset
2732:b1c5b0c369c2
mod_http_upload: Remove directory when deleting a file (fixes #950)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 27 Jul 2017 16:46:18 +0200 |
parents | 2731:d48faff92490 |
children | 2733:c8161146c698 |
files | mod_http_upload/mod_http_upload.lua |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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