From 7875c914d3cc4b533b058c9f78354cf6e0bb4192 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 15 May 2015 15:16:03 +0200 Subject: mod_storage_xep0227: Use configured storage path --- plugins/mod_storage_xep0227.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/mod_storage_xep0227.lua') diff --git a/plugins/mod_storage_xep0227.lua b/plugins/mod_storage_xep0227.lua index 5d07a2ea..ebecad04 100644 --- a/plugins/mod_storage_xep0227.lua +++ b/plugins/mod_storage_xep0227.lua @@ -7,12 +7,13 @@ local t_remove = table.remove; local os_remove = os.remove; local io_open = io.open; +local paths = require"util.paths"; local st = require "util.stanza"; local parse_xml_real = require "util.xml".parse; local function getXml(user, host) local jid = user.."@"..host; - local path = "data/"..jid..".xml"; + local path = paths.join(prosody.paths.data, jid..".xml"); local f = io_open(path); if not f then return; end local s = f:read("*a"); @@ -20,7 +21,7 @@ local function getXml(user, host) end local function setXml(user, host, xml) local jid = user.."@"..host; - local path = "data/"..jid..".xml"; + local path = paths.join(prosody.paths.data, jid..".xml"); if xml then local f = io_open(path, "w"); if not f then return; end -- cgit v1.2.3