projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bba1c46
)
util.datamanager: Skip past second check if first attemtp to open file succeeds
author
Kim Alvefur
<zash@zash.se>
Fri, 11 Dec 2015 19:18:24 +0000
(20:18 +0100)
committer
Kim Alvefur
<zash@zash.se>
Fri, 11 Dec 2015 19:18:24 +0000
(20:18 +0100)
util/datamanager.lua
patch
|
blob
|
history
diff --git
a/util/datamanager.lua
b/util/datamanager.lua
index 4a371d2ce7652360ac2be1b43875e2f3c16eb788..b7c514ad5b4cd15e805cbda4948138e63c88b8ac 100644
(file)
--- a/
util/datamanager.lua
+++ b/
util/datamanager.lua
@@
-214,9
+214,9
@@
local function append(username, host, datastore, ext, data)
local f, msg = io_open(filename, "r+");
if not f then
f, msg = io_open(filename, "w");
- end
- if not f then
- return nil, msg;
+ if not f then
+ return nil, msg;
+ end
end
local pos = f:seek("end");
local ok, msg = fallocate(f, pos, #data);