# HG changeset patch # User João Duarte # Date 1564062364 25200 # Node ID 628e238feb04d7c15a7720fa4f849b6b1ae067df # Parent 882ca2f965d594a4e3daa54b5c57ca485856d340 util.startup: Removed unnecessary if clause at startup.set_plugindir diff -r 882ca2f965d5 -r 628e238feb04 util/startup.lua --- 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()