From c20cc1a17b2bd0ef75ad2c26e288011902b57206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Thu, 25 Jul 2019 06:46:04 -0700 Subject: util.startup: Removed unnecessary if clause at startup.set_plugindir --- util/startup.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'util') diff --git a/util/startup.lua b/util/startup.lua index 65a131fe..54b968f8 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -235,17 +235,15 @@ function startup.setup_plugindir() 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() -- cgit v1.2.3