diff options
author | Kim Alvefur <zash@zash.se> | 2015-12-11 20:18:24 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-12-11 20:18:24 +0100 |
commit | 74caca930a0fffb2975a1043d2d5033a9c9647ef (patch) | |
tree | c9c3f63a4f5e44b197e3332c2489c96f6b48d9f5 /util | |
parent | 8ecd4052a5f14f556df22a5c1ea34e7ce2314297 (diff) | |
download | prosody-74caca930a0fffb2975a1043d2d5033a9c9647ef.tar.gz prosody-74caca930a0fffb2975a1043d2d5033a9c9647ef.zip |
util.datamanager: Skip past second check if first attemtp to open file succeeds
Diffstat (limited to 'util')
-rw-r--r-- | util/datamanager.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua index 4a371d2c..b7c514ad 100644 --- 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); |