# HG changeset patch # User Kim Alvefur # Date 1449861774 -3600 # Node ID 644b1bddc676e77f86da5e590bc9dc29a00d7ab2 # Parent 807b0b2ee545e75d973d5cd6f5264a305af0acae util.datamanager: No shadowing of variable [luacheck] diff -r 807b0b2ee545 -r 644b1bddc676 util/datamanager.lua --- a/util/datamanager.lua Fri Dec 11 20:18:24 2015 +0100 +++ b/util/datamanager.lua Fri Dec 11 20:22:54 2015 +0100 @@ -211,6 +211,8 @@ 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 @@ 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);