aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_xep0227.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-05-15 15:16:03 +0200
committerKim Alvefur <zash@zash.se>2015-05-15 15:16:03 +0200
commit437ae6da4629b0390c8f7b32bd5ad1d9312f3728 (patch)
treee92d1c136ce59f6f277d5f3fba0b1a7ab374e831 /plugins/mod_storage_xep0227.lua
parente6aaeb7b8489955df0c811003f6f4726e40e1f26 (diff)
downloadprosody-437ae6da4629b0390c8f7b32bd5ad1d9312f3728.tar.gz
prosody-437ae6da4629b0390c8f7b32bd5ad1d9312f3728.zip
mod_storage_xep0227: Use configured storage path
Diffstat (limited to 'plugins/mod_storage_xep0227.lua')
-rw-r--r--plugins/mod_storage_xep0227.lua5
1 files changed, 3 insertions, 2 deletions
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