aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Duarte <jvsDuarte08@gmail.com>2019-08-01 08:08:06 -0700
committerJoão Duarte <jvsDuarte08@gmail.com>2019-08-01 08:08:06 -0700
commitd2fc41c9e754d20a7c432b10b2db4f840e8fae54 (patch)
tree7385ff98bacd96fe2cf7df69a5df574e6b936b2f
parenta3f41c2b14b3776e6009d90d2fbc024b306620a7 (diff)
downloadprosody-d2fc41c9e754d20a7c432b10b2db4f840e8fae54.tar.gz
prosody-d2fc41c9e754d20a7c432b10b2db4f840e8fae54.zip
util.startup: Directly calling lfs.currentdir instead of storing it in a local variable
-rw-r--r--util/startup.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/startup.lua b/util/startup.lua
index e7107a9c..abf985f8 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -236,8 +236,7 @@ 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
- local current_directory = require "lfs".currentdir();
- installer_plugin_path = config.resolve_relative_path(current_directory, installer_plugin_path);
+ installer_plugin_path = config.resolve_relative_path(require "lfs".currentdir(), installer_plugin_path);
require "lfs".mkdir(installer_plugin_path)
-- Checking for duplicates
-- The commands using luarocks need the path to the directory that has the /share and /lib folders.