diff options
author | Kim Alvefur <zash@zash.se> | 2017-03-28 17:31:24 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-03-28 17:31:24 +0200 |
commit | 5c4a8d13e221f6d4876dc55eeed56391e455dd2d (patch) | |
tree | e1a756b054eef668fc63ec4d44e4a3c9a4ff654e /util | |
parent | d6184b31a325c1621e86217ba3d01afa7e685788 (diff) | |
download | prosody-5c4a8d13e221f6d4876dc55eeed56391e455dd2d.tar.gz prosody-5c4a8d13e221f6d4876dc55eeed56391e455dd2d.zip |
util.datamanager: Rearrange locals
Diffstat (limited to 'util')
-rw-r--r-- | util/datamanager.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua index b2a5fa0e..2ed672e5 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -223,8 +223,7 @@ local function append(username, host, datastore, ext, data) 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 function append(username, host, datastore, ext, data) local pos = f:seek("end"); - ok, msg = atomic_append(f, data); + local ok, msg = atomic_append(f, data); if not ok then f:close(); |