# HG changeset patch # User Kim Alvefur # Date 1431695763 -7200 # Node ID 3d27f5855f4bd317e18c643a2e743389dec25685 # Parent 6d717795708abee04ff972acb2f592708bed0b99 mod_storage_xep0227: Use configured storage path diff -r 6d717795708a -r 3d27f5855f4b plugins/mod_storage_xep0227.lua --- a/plugins/mod_storage_xep0227.lua Fri May 15 15:14:30 2015 +0200 +++ b/plugins/mod_storage_xep0227.lua Fri May 15 15:16:03 2015 +0200 @@ -7,12 +7,13 @@ 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 @@ 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