aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commit7875c914d3cc4b533b058c9f78354cf6e0bb4192 (patch)
treee92d1c136ce59f6f277d5f3fba0b1a7ab374e831 /plugins
parentde9745b3323173e4bb65ba30e86ba6e41659af09 (diff)
downloadprosody-7875c914d3cc4b533b058c9f78354cf6e0bb4192.tar.gz
prosody-7875c914d3cc4b533b058c9f78354cf6e0bb4192.zip
mod_storage_xep0227: Use configured storage path
Diffstat (limited to 'plugins')
-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