-- This version of the code is courtesy of Poikilos (January 2024). local WIN32, DIR_SEP if os.getenv ("WINDIR") then WIN32 = true DIR_SEP = "\\" else WIN32 = false DIR_SEP = "/" end function os.mkdir (dir) local f = io.open (dir .. DIR_SEP .. ".placeholder") if f then f:close() return end -- minetest.log ("info", "Warning: called deprecated os.mkdir") if WIN32 then dir = dir:gsub ("/", "\\") else dir = dir:gsub ("\\", "/") end if minetest.mkdir then minetest.mkdir (dir) else os.execute ('mkdir "' .. dir .. '"') local f = io.open (dir .. DIR_SEP .. ".placeholder", "w") if f then f:write ("DO NOT DELETE!!!\n") f:close() end end end