Software /
code /
prosody
Changeset
10193:9cad58759b3e
util.startupt: setup_plugindir now uses lfs.mkdir to check/create directories
author | João Duarte <jvsDuarte08@gmail.com> |
---|---|
date | Thu, 01 Aug 2019 07:48:11 -0700 |
parents | 10192:761ff113c741 |
children | 10194:dad1bc5fdb8e |
files | util/startup.lua |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/util/startup.lua Thu Aug 01 04:33:05 2019 -0700 +++ b/util/startup.lua Thu Aug 01 07:48:11 2019 -0700 @@ -240,10 +240,7 @@ 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