Software /
code /
prosody
Diff
util/datamanager.lua @ 3108:df0df92dd58a
util.datamanager: Return an error string when failing to save.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 23 May 2010 23:55:01 +0500 |
parent | 3086:931acb1188b1 |
child | 3722:f15b6ed967b7 |
line wrap: on
line diff
--- a/util/datamanager.lua Sun May 23 05:46:52 2010 +0500 +++ b/util/datamanager.lua Sun May 23 23:55:01 2010 +0500 @@ -145,7 +145,7 @@ 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);