aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);