util.startup: Directly calling lfs.currentdir instead of storing it in a local variable
authorJoão Duarte <jvsDuarte08@gmail.com>
Thu, 01 Aug 2019 08:08:06 -0700
changeset 10199 3409f746f978
parent 10198 dad1bc5fdb8e
child 10200 5e1012f2f2b7
util.startup: Directly calling lfs.currentdir instead of storing it in a local variable
util/startup.lua
--- a/util/startup.lua	Thu Aug 01 08:02:26 2019 -0700
+++ b/util/startup.lua	Thu Aug 01 08:08:06 2019 -0700
@@ -236,8 +236,7 @@
 		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.