Software /
code /
prosody
Comparison
util/startup.lua @ 10171:628e238feb04
util.startup: Removed unnecessary if clause at startup.set_plugindir
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Thu, 25 Jul 2019 06:46:04 -0700 |
parent | 10163:661feb336e18 |
child | 10173:0513dd2830b7 |
comparison
equal
deleted
inserted
replaced
10170:882ca2f965d5 | 10171:628e238feb04 |
---|---|
233 -- path1;path2;path3;defaultpath... | 233 -- path1;path2;path3;defaultpath... |
234 -- luacheck: ignore 111 | 234 -- luacheck: ignore 111 |
235 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); | 235 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); |
236 prosody.paths.plugins = CFG_PLUGINDIR; | 236 prosody.paths.plugins = CFG_PLUGINDIR; |
237 end | 237 end |
238 if installer_plugin_paths then | 238 for path, _ in ipairs(installer_plugin_paths) do |
239 for path, _ in ipairs(installer_plugin_paths) do | 239 if os.execute('[ -d "'..installer_plugin_paths[path]..'" ]') ~= 0 then |
240 if os.execute('[ -d "'..installer_plugin_paths[path]..'" ]') ~= 0 then | 240 os.execute("mkdir "..installer_plugin_paths[path]) |
241 os.execute("mkdir "..installer_plugin_paths[path]) | 241 end |
242 end | 242 end |
243 end | 243 local path_sep = package.config:sub(3,3); |
244 local path_sep = package.config:sub(3,3); | 244 -- luacheck: ignore 111 |
245 -- luacheck: ignore 111 | 245 CFG_PLUGINDIR = table.concat(installer_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); |
246 CFG_PLUGINDIR = table.concat(installer_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); | 246 prosody.paths.plugins = CFG_PLUGINDIR; |
247 prosody.paths.plugins = CFG_PLUGINDIR; | |
248 end | |
249 end | 247 end |
250 | 248 |
251 function startup.chdir() | 249 function startup.chdir() |
252 if prosody.installed then | 250 if prosody.installed then |
253 -- Change working directory to data path. | 251 -- Change working directory to data path. |