Software /
code /
prosody
Diff
util/datamanager.lua @ 13231:6a11d92ae436
util.datamanager: Disable block alignment
Until we have more test coverage. Somehow the index becomes incorrect
after inserting padding, unclear why.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Jul 2023 18:03:22 +0200 |
parent | 13186:affaf6d08d26 |
child | 13234:c886ea087b38 |
line wrap: on
line diff
--- a/util/datamanager.lua Fri Jul 21 17:23:00 2023 +0200 +++ b/util/datamanager.lua Fri Jul 21 18:03:22 2023 +0200 @@ -245,12 +245,14 @@ 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);