mirror of
https://github.com/appgurueu/modlib.git
synced 2024-12-22 21:32:27 +01:00
write_binary: default to safe file write on MT
This commit is contained in:
parent
eb0c6b28d3
commit
9bfefb9283
2
file.lua
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user