From 437ae6da4629b0390c8f7b32bd5ad1d9312f3728 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') 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