Comparison

util/startup.lua @ 8733:6a234e77c99f

util.startup: Fix traceback due to both plugin path becoming nil if plugin_paths is unset
author Kim Alvefur <zash@zash.se>
date Fri, 06 Apr 2018 16:50:51 +0200
parent 8728:41c959c5c84b
child 8734:36d49a9c5e88
comparison
equal deleted inserted replaced
8732:863f66cdd1df 8733:6a234e77c99f
218 if custom_plugin_paths then 218 if custom_plugin_paths then
219 local path_sep = package.config:sub(3,3); 219 local path_sep = package.config:sub(3,3);
220 -- path1;path2;path3;defaultpath... 220 -- path1;path2;path3;defaultpath...
221 -- luacheck: ignore 111 221 -- luacheck: ignore 111
222 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); 222 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins");
223 end 223 prosody.paths.plugins = CFG_PLUGINDIR;
224 prosody.paths.plugins = CFG_PLUGINDIR; 224 end
225 end 225 end
226 226
227 function startup.chdir() 227 function startup.chdir()
228 if prosody.installed then 228 if prosody.installed then
229 -- Change working directory to data path. 229 -- Change working directory to data path.