Mercurial > prosody-modules
comparison mod_http_upload/mod_http_upload.lua @ 3661:88d414c916ee
mod_http_upload: Back out 3fb0add97cdb - depends on yet uncommon lfs version
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 30 Aug 2019 18:34:55 +0200 |
parents | bb8a6df5ecba |
children | 53fc4b612fb2 |
comparison
equal
deleted
inserted
replaced
3660:11cd6e034fd3 | 3661:88d414c916ee |
---|---|
102 | 102 |
103 -- state | 103 -- state |
104 local pending_slots = module:shared("upload_slots"); | 104 local pending_slots = module:shared("upload_slots"); |
105 | 105 |
106 local storage_path = module:get_option_string(module.name .. "_path", join_path(prosody.paths.data, module.name)); | 106 local storage_path = module:get_option_string(module.name .. "_path", join_path(prosody.paths.data, module.name)); |
107 | 107 lfs.mkdir(storage_path); |
108 do | |
109 local ok, err, errno = lfs.mkdir(storage_path); | |
110 -- 17 should be EEXIST, which is fine | |
111 assert(ok or errno == 17, "Storage path must be writable by Prosody\n"..err); | |
112 end | |
113 | 108 |
114 local function expire(username, host) | 109 local function expire(username, host) |
115 if not max_age then return true; end | 110 if not max_age then return true; end |
116 local uploads, err = datamanager.list_load(username, host, module.name); | 111 local uploads, err = datamanager.list_load(username, host, module.name); |
117 if err then return false, err; end | 112 if err then return false, err; end |