aboutsummaryrefslogtreecommitdiffstats
path: root/util/startup.lua
diff options
context:
space:
mode:
authorJoão Duarte <jvsDuarte08@gmail.com>2019-08-01 07:48:11 -0700
committerJoão Duarte <jvsDuarte08@gmail.com>2019-08-01 07:48:11 -0700
commitded9e843e3c7f2fa463310ce15be271d252b76a4 (patch)
tree33c9b67e977d78777815201c1aae53a248e340fc /util/startup.lua
parent92fafa3343526ed26f66dc81d26167b7e0850f69 (diff)
downloadprosody-ded9e843e3c7f2fa463310ce15be271d252b76a4.tar.gz
prosody-ded9e843e3c7f2fa463310ce15be271d252b76a4.zip
util.startupt: setup_plugindir now uses lfs.mkdir to check/create directories
Diffstat (limited to 'util/startup.lua')
-rw-r--r--util/startup.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/util/startup.lua b/util/startup.lua
index 4b3842bb..8c6c8b99 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -240,10 +240,7 @@ function startup.setup_plugindir()
end
local current_directory = require "lfs".currentdir();
installer_plugin_path = config.resolve_relative_path(current_directory, installer_plugin_path);
- -- Checking if the folder exists. If it doesn't, we create it, but we need permissions to do so
- if os.execute('[ -d "'..installer_plugin_path..'" ]') ~= 0 then
- os.execute("mkdir "..installer_plugin_path);
- end
+ require "lfs".mkdir(installer_plugin_path)
-- Developers may have add these custom paths to their LUA_PATH/LUA_CPATH variables, before running prosody
-- Therefore, I'll just check if the paths we are about to add aren't already at package.(path/cpath)
if not string.match(package.path, installer_plugin_path) then