aboutsummaryrefslogtreecommitdiffstats
path: root/util/datamanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-12-11 20:22:54 +0100
committerKim Alvefur <zash@zash.se>2015-12-11 20:22:54 +0100
commitda98f6463936788e85bff956434c308f6bb66058 (patch)
treebee7491da3329bc2de0b37558e56fd0089567bf1 /util/datamanager.lua
parentc54585b91c729ef71c2fd272dcf2675311f5a96a (diff)
downloadprosody-da98f6463936788e85bff956434c308f6bb66058.tar.gz
prosody-da98f6463936788e85bff956434c308f6bb66058.zip
util.datamanager: No shadowing of variable [luacheck]
Diffstat (limited to 'util/datamanager.lua')
-rw-r--r--util/datamanager.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index b7c514ad..786abd95 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -211,6 +211,8 @@ end
local function append(username, host, datastore, ext, data)
local filename = getpath(username, host, datastore, ext, true);
+
+ local ok;
local f, msg = io_open(filename, "r+");
if not f then
f, msg = io_open(filename, "w");
@@ -219,7 +221,7 @@ local function append(username, host, datastore, ext, data)
end
end
local pos = f:seek("end");
- local ok, msg = fallocate(f, pos, #data);
+ ok, msg = fallocate(f, pos, #data);
f:seek("set", pos);
if ok then
f:write(data);