aboutsummaryrefslogtreecommitdiffstats
path: root/util/datamanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-05-23 23:55:01 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-05-23 23:55:01 +0500
commit42f63b21d79733a2198952245df0673434bd31d2 (patch)
treec0744d7d2cdf6326310ce56b7545f0931dcc31d8 /util/datamanager.lua
parent8abd2f2c24bd83acb36e9c8ace40ac3751f09663 (diff)
downloadprosody-42f63b21d79733a2198952245df0673434bd31d2.tar.gz
prosody-42f63b21d79733a2198952245df0673434bd31d2.zip
util.datamanager: Return an error string when failing to save.
Diffstat (limited to 'util/datamanager.lua')
-rw-r--r--util/datamanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index 9d96e5b3..57cd2594 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -145,7 +145,7 @@ function store(username, host, datastore, data)
local f, msg = io_open(getpath(username, host, datastore, nil, true), "w+");
if not f then
log("error", "Unable to write to "..datastore.." storage ('"..msg.."') for user: "..(username or "nil").."@"..(host or "nil"));
- return;
+ return nil, "Error saving to storage";
end
f:write("return ");
append(f, data);