# HG changeset patch # User Kim Alvefur # Date 1485707560 -3600 # Node ID 9ff809591fbce85e277a98e6284e97a04d9f016f # Parent 43f7637f0143507db6e849fb8ba356debcd01c7b mod_http_upload: Accept already existing directory name if there is no conflicting file in it diff -r 43f7637f0143 -r 9ff809591fbc mod_http_upload/mod_http_upload.lua --- a/mod_http_upload/mod_http_upload.lua Sun Jan 29 17:31:28 2017 +0100 +++ b/mod_http_upload/mod_http_upload.lua Sun Jan 29 17:32:40 2017 +0100 @@ -87,7 +87,7 @@ local random; repeat random = uuid(); - until lfs.mkdir(join_path(storage_path, random)) + until lfs.mkdir(join_path(storage_path, random)) or not lfs.attributes(join_path(storage_path, random, filename)) pending_slots[random.."/"..filename] = origin.full_jid; local base_url = module:http_url();