Software /
code /
prosody
Diff
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 |
line wrap: on
line diff
--- a/util/startup.lua Thu Jul 25 04:25:40 2019 -0700 +++ b/util/startup.lua Thu Jul 25 06:46:04 2019 -0700 @@ -235,17 +235,15 @@ CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); prosody.paths.plugins = CFG_PLUGINDIR; end - if installer_plugin_paths then - for path, _ in ipairs(installer_plugin_paths) do - if os.execute('[ -d "'..installer_plugin_paths[path]..'" ]') ~= 0 then - os.execute("mkdir "..installer_plugin_paths[path]) - end + for path, _ in ipairs(installer_plugin_paths) do + if os.execute('[ -d "'..installer_plugin_paths[path]..'" ]') ~= 0 then + os.execute("mkdir "..installer_plugin_paths[path]) end - local path_sep = package.config:sub(3,3); - -- luacheck: ignore 111 - CFG_PLUGINDIR = table.concat(installer_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); - prosody.paths.plugins = CFG_PLUGINDIR; end + local path_sep = package.config:sub(3,3); + -- luacheck: ignore 111 + CFG_PLUGINDIR = table.concat(installer_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); + prosody.paths.plugins = CFG_PLUGINDIR; end function startup.chdir()