diff options
author | Kim Alvefur <zash@zash.se> | 2017-03-23 01:30:58 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-03-23 01:30:58 +0100 |
commit | 761779fef974a25ec1d96f93941cc54bb40ae0af (patch) | |
tree | 8907b93b95ab3e10a7e3fc7aaef48a769cd190b0 /util | |
parent | 2880ac5ebadc2b3eb7f4b05f80365c4847ee4b1d (diff) | |
parent | 886603192223eeb71f83997c6958bf120cb1c530 (diff) | |
download | prosody-761779fef974a25ec1d96f93941cc54bb40ae0af.tar.gz prosody-761779fef974a25ec1d96f93941cc54bb40ae0af.zip |
Merge 0.10->trunk
Diffstat (limited to 'util')
-rw-r--r-- | util/datamanager.lua | 26 | ||||
-rw-r--r-- | util/dependencies.lua | 2 |
2 files changed, 8 insertions, 20 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua index 2b47c3c4..b825cb33 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -24,8 +24,10 @@ local t_insert = table.insert; local t_concat = table.concat; local envloadfile = require"util.envload".envloadfile; local serialize = require "util.serialization".serialize; -local path_separator = assert ( package.config:match ( "^([^\n]+)" ) , "package.config not in standard form" ) -- Extract directory seperator from package.config (an undocumented string that comes with lua) local lfs = require "lfs"; +-- Extract directory seperator from package.config (an undocumented string that comes with lua) +local path_separator = assert ( package.config:match ( "^([^\n]+)" ) , "package.config not in standard form" ) + local prosody = prosody; local raw_mkdir = lfs.mkdir; @@ -130,15 +132,8 @@ local function load(username, host, datastore) -- No such file, ok to ignore return nil; end - local mode = lfs.attributes(getpath(username, host, datastore), "mode"); - if not mode then - log("debug", "Assuming empty %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil"); - return nil; - else -- file exists, but can't be read - -- TODO more detailed error checking and logging? - log("error", "Failed to load %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil"); - return nil, "Error reading storage"; - end + log("error", "Failed to load %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil"); + return nil, "Error reading storage"; end local success, ret = pcall(data); @@ -304,15 +299,8 @@ local function list_load(username, host, datastore) -- No such file, ok to ignore return nil; end - local mode = lfs.attributes(getpath(username, host, datastore, "list"), "mode"); - if not mode then - log("debug", "Assuming empty %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil"); - return nil; - else -- file exists, but can't be read - -- TODO more detailed error checking and logging? - log("error", "Failed to load %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil"); - return nil, "Error reading storage"; - end + log("error", "Failed to load %s storage ('%s') for user: %s@%s", datastore, err, username or "nil", host or "nil"); + return nil, "Error reading storage"; end local success, ret = pcall(data); diff --git a/util/dependencies.lua b/util/dependencies.lua index 38aced70..9b0afd77 100644 --- a/util/dependencies.lua +++ b/util/dependencies.lua @@ -93,7 +93,7 @@ local function check_dependencies() if not ssl then missingdep("LuaSec", { - ["Debian/Ubuntu"] = "https://prosody.im/download/start#debian_and_ubuntu"; + ["Debian/Ubuntu"] = "sudo apt-get install lua-sec"; ["luarocks"] = "luarocks install luasec"; ["Source"] = "https://github.com/brunoos/luasec"; }, "SSL/TLS support will not be available"); |