Software /
code /
prosody-modules
Diff
mod_http_upload/mod_http_upload.lua @ 2288:827f01cbf6ba
mod_http_upload: Handle case of non-existant path
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 23 Aug 2016 02:13:34 +0200 |
parent | 2287:e1a8c2324937 |
child | 2443:7f9ff36dc8d5 |
line wrap: on
line diff
--- a/mod_http_upload/mod_http_upload.lua Tue Aug 23 02:09:32 2016 +0200 +++ b/mod_http_upload/mod_http_upload.lua Tue Aug 23 02:13:34 2016 +0200 @@ -88,7 +88,7 @@ pending_slots[random.."/"..filename] = origin.full_jid; local base_url = module:http_url(); local slot_url = url.parse(base_url); - slot_url.path = url.parse_path(slot_url.path); + slot_url.path = url.parse_path(slot_url.path or "/"); t_insert(slot_url.path, random); t_insert(slot_url.path, filename); slot_url.path.is_directory = false;