# HG changeset patch # User Kim Alvefur # Date 1689956896 -7200 # Node ID c886ea087b382876fc2ae89af4124e64df7f8fdc # Parent 37d67b5f9768ccdfc32240b595c96c7e3b9b6319 util.datamanager: Disable blockwise removal In desperate need of tests diff -r 37d67b5f9768 -r c886ea087b38 util/datamanager.lua --- a/util/datamanager.lua Fri Jul 21 22:49:01 2023 +0200 +++ b/util/datamanager.lua Fri Jul 21 18:28:16 2023 +0200 @@ -32,6 +32,7 @@ local prosody = prosody; +--luacheck: ignore 211/blocksize 211/remove_blocks local blocksize = 0x1000; local raw_mkdir = lfs.mkdir; local atomic_append; @@ -41,7 +42,7 @@ local pposix = require "prosody.util.pposix"; raw_mkdir = pposix.mkdir or raw_mkdir; -- Doesn't trample on umask atomic_append = pposix.atomic_append; - remove_blocks = pposix.remove_blocks; + -- remove_blocks = pposix.remove_blocks; ENOENT = pposix.ENOENT or ENOENT; end); @@ -583,6 +584,7 @@ return true; end + --[[ if remove_blocks then local f, err = io_open(list_filename, "r+"); if not f then @@ -620,6 +622,7 @@ end end end + --]] local r, err = io_open(list_filename, "r"); if not r then