projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06c84a1
)
util.datamanager: No shadowing of variable [luacheck]
author
Kim Alvefur
<zash@zash.se>
Fri, 11 Dec 2015 19:22:54 +0000
(20:22 +0100)
committer
Kim Alvefur
<zash@zash.se>
Fri, 11 Dec 2015 19:22:54 +0000
(20:22 +0100)
util/datamanager.lua
patch
|
blob
|
history
diff --git
a/util/datamanager.lua
b/util/datamanager.lua
index b7c514ad5b4cd15e805cbda4948138e63c88b8ac..786abd956381193c7e4b9c87093d375ebd499cd0 100644
(file)
--- 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);