Changeset

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
parents 2287:e1a8c2324937
children 2289:aa984980a4dc
files mod_http_upload/mod_http_upload.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;