aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_xep0227.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-05-15 15:25:59 +0200
committerKim Alvefur <zash@zash.se>2015-05-15 15:25:59 +0200
commitdabbd2ce70cea0764e992b35fdbe4db77988c015 (patch)
treeecf9fb08dc87a2cdd584a48a0520049aeea9df32 /plugins/mod_storage_xep0227.lua
parent72be074759b48e715c88c5c880e5f4b523f3ee5d (diff)
downloadprosody-dabbd2ce70cea0764e992b35fdbe4db77988c015.tar.gz
prosody-dabbd2ce70cea0764e992b35fdbe4db77988c015.zip
mod_storage_xep0227: Return error from io.open if unable to open file for writing
Diffstat (limited to 'plugins/mod_storage_xep0227.lua')
-rw-r--r--plugins/mod_storage_xep0227.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_storage_xep0227.lua b/plugins/mod_storage_xep0227.lua
index 22575fe3..61ef7d6d 100644
--- a/plugins/mod_storage_xep0227.lua
+++ b/plugins/mod_storage_xep0227.lua
@@ -23,8 +23,8 @@ end
local function setXml(user, host, xml)
local jid = user.."@"..host;
local path = paths.join(prosody.paths.data, jid..".xml");
- local f = io_open(path, "w");
- if not f then return; end
+ local f, err = io_open(path, "w");
+ if not f then return f, err; end
if xml then
local s = tostring(xml);
f:write(s);