From 9bfefb9283b0fdba9b5d71f37c493a17878e265e Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sat, 8 Jan 2022 13:30:54 +0100 Subject: [PATCH] write_binary: default to safe file write on MT --- file.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/file.lua b/file.lua index e548443..35e435a 100644 --- a/file.lua +++ b/file.lua @@ -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