Software /
code /
prosody
Changeset
8013:72cfbe377326
util.datamanager: Rearrange locals
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 28 Mar 2017 17:31:24 +0200 |
parents | 8012:e898c8fda986 |
children | 8014:ff3787033abb |
files | util/datamanager.lua |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/util/datamanager.lua Tue Feb 28 13:26:05 2017 +0100 +++ b/util/datamanager.lua Tue Mar 28 17:31:24 2017 +0200 @@ -223,8 +223,7 @@ if type(data) ~= "string" then return; end local filename = getpath(username, host, datastore, ext, true); - local ok; - local f, msg, errno = io_open(filename, "r+"); + local f = io_open(filename, "r+"); if not f then return atomic_store(filename, data); -- File did probably not exist, let's create it @@ -232,7 +231,7 @@ local pos = f:seek("end"); - ok, msg = atomic_append(f, data); + local ok, msg = atomic_append(f, data); if not ok then f:close();