diff options
author | Kim Alvefur <zash@zash.se> | 2023-07-21 18:03:22 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-07-21 18:03:22 +0200 |
commit | 8699c98ad88373cb524175c4035edc5610bddb77 (patch) | |
tree | 05b2237a39b646656549546a4d3b5f89af3e8caf | |
parent | 99cca59d6e53584e8e72e64af4b205f9802bec07 (diff) | |
download | prosody-8699c98ad88373cb524175c4035edc5610bddb77.tar.gz prosody-8699c98ad88373cb524175c4035edc5610bddb77.zip |
util.datamanager: Disable block alignment
Until we have more test coverage. Somehow the index becomes incorrect
after inserting padding, unclear why.
-rw-r--r-- | util/datamanager.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua index 6759592a..8f925fd4 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -245,12 +245,14 @@ local function append(username, host, datastore, ext, data) end local pos = f:seek("end"); + --[[ TODO needs tests if (blocksize-(pos%blocksize)) < (#data%blocksize) then -- pad to blocksize with newlines so that the next item is both on a new -- block and a new line atomic_append(f, ("\n"):rep(blocksize-(pos%blocksize))); pos = f:seek("end"); end + --]] local ok, msg = atomic_append(f, data); |