write_binary: default to safe file write on MT

This commit is contained in:
Lars Mueller 2022-01-08 13:30:54 +01:00
parent eb0c6b28d3
commit 9bfefb9283

@ -50,6 +50,8 @@ function write_binary(filename, new_content)
return true
end
write_binary = minetest and minetest.safe_file_write or write_binary_unsafe
function ensure_content(filename, ensured_content)
local content = read(filename)
if content ~= ensured_content then