aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-05-09 19:35:29 +0200
committerKim Alvefur <zash@zash.se>2014-05-09 19:35:29 +0200
commit36b77bca8b95755721072cdb0e677e30458593e4 (patch)
tree79c439fbb15efa9d233466a37f727ae57b2b397e
parent084761b5efd4633f02cae9827494b4178749fd6b (diff)
downloadprosody-36b77bca8b95755721072cdb0e677e30458593e4.tar.gz
prosody-36b77bca8b95755721072cdb0e677e30458593e4.zip
core.certmanager, core.moduleapi, mod_storage_sql, mod_storage_sql2: Import from util.paths
-rw-r--r--core/certmanager.lua2
-rw-r--r--core/moduleapi.lua3
-rw-r--r--plugins/mod_storage_sql.lua2
-rw-r--r--plugins/mod_storage_sql2.lua2
4 files changed, 5 insertions, 4 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index 74da771e..d6a59b9f 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -19,7 +19,7 @@ local t_concat = table.concat;
local t_insert = table.insert;
local prosody = prosody;
-local resolve_path = configmanager.resolve_relative_path;
+local resolve_path = require"util.paths".resolve_relative_path;
local config_path = prosody.paths.config;
local luasec_has_noticket, luasec_has_verifyext, luasec_has_no_compression;
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 65e00d41..8b477140 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -13,6 +13,7 @@ local set = require "util.set";
local logger = require "util.logger";
local pluginloader = require "util.pluginloader";
local timer = require "util.timer";
+local resolve_relative_path = require"util.paths".resolve_relative_path;
local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat;
local error, setmetatable, type = error, setmetatable, type;
@@ -360,7 +361,7 @@ function api:get_directory()
end
function api:load_resource(path, mode)
- path = config.resolve_relative_path(self:get_directory(), path);
+ path = resolve_relative_path(self:get_directory(), path);
return io.open(path, mode);
end
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 1f453d42..7b810ab8 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -49,7 +49,7 @@ local function db2uri(params)
end
-local resolve_relative_path = require "core.configmanager".resolve_relative_path;
+local resolve_relative_path = require "util.paths".resolve_relative_path;
local function test_connection()
if not connection then return nil; end
diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua
index 7414e5ed..249c72a7 100644
--- a/plugins/mod_storage_sql2.lua
+++ b/plugins/mod_storage_sql2.lua
@@ -2,7 +2,7 @@
local json = require "util.json";
local xml_parse = require "util.xml".parse;
local uuid = require "util.uuid";
-local resolve_relative_path = require "core.configmanager".resolve_relative_path;
+local resolve_relative_path = require "util.paths".resolve_relative_path;
local stanza_mt = require"util.stanza".stanza_mt;
local getmetatable = getmetatable;