# HG changeset patch # User Kim Alvefur # Date 1399656929 -7200 # Node ID 6a184b16b71718ce57b437537405fd7f68c49137 # Parent ef4024f6bc403ec8f7d18bbaade57a8b53545906 core.certmanager, core.moduleapi, mod_storage_sql, mod_storage_sql2: Import from util.paths diff -r ef4024f6bc40 -r 6a184b16b717 core/certmanager.lua --- a/core/certmanager.lua Fri May 09 19:34:35 2014 +0200 +++ b/core/certmanager.lua Fri May 09 19:35:29 2014 +0200 @@ -19,7 +19,7 @@ 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 -r ef4024f6bc40 -r 6a184b16b717 core/moduleapi.lua --- a/core/moduleapi.lua Fri May 09 19:34:35 2014 +0200 +++ b/core/moduleapi.lua Fri May 09 19:35:29 2014 +0200 @@ -13,6 +13,7 @@ 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 @@ 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 -r ef4024f6bc40 -r 6a184b16b717 plugins/mod_storage_sql.lua --- a/plugins/mod_storage_sql.lua Fri May 09 19:34:35 2014 +0200 +++ b/plugins/mod_storage_sql.lua Fri May 09 19:35:29 2014 +0200 @@ -49,7 +49,7 @@ 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 -r ef4024f6bc40 -r 6a184b16b717 plugins/mod_storage_sql2.lua --- a/plugins/mod_storage_sql2.lua Fri May 09 19:34:35 2014 +0200 +++ b/plugins/mod_storage_sql2.lua Fri May 09 19:35:29 2014 +0200 @@ -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;