aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJoão Duarte <jvsDuarte08@gmail.com>2019-07-25 06:46:04 -0700
committerJoão Duarte <jvsDuarte08@gmail.com>2019-07-25 06:46:04 -0700
commitc20cc1a17b2bd0ef75ad2c26e288011902b57206 (patch)
tree07ab8a133e605ab1e344414164eebe1d41f8e468 /util
parent47421968357f79d18b68ca8999bc1c17b8a786e6 (diff)
downloadprosody-c20cc1a17b2bd0ef75ad2c26e288011902b57206.tar.gz
prosody-c20cc1a17b2bd0ef75ad2c26e288011902b57206.zip
util.startup: Removed unnecessary if clause at startup.set_plugindir
Diffstat (limited to 'util')
-rw-r--r--util/startup.lua16
1 files changed, 7 insertions, 9 deletions
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()