equal
deleted
inserted
replaced
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 |