From 5cf756245b3f829ebb91930323664fe8a4f4cc50 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sat, 6 Nov 2021 18:35:29 +0100 Subject: [PATCH] Prevent global access warning --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 6783936..82eb412 100644 --- a/init.lua +++ b/init.lua @@ -81,7 +81,7 @@ if not minetest then parent_dir = init_path and init_path:match"^.[/\\]" or "" end -local dir_delim = rawget(_G, "DIR_DELIM") or (package and package.config and assert(package.config:match("^(.-)[\r\n]"))) or "/" +local dir_delim = rawget(_G, "DIR_DELIM") or (rawget(_G, "package") and package.config and assert(package.config:match("^(.-)[\r\n]"))) or "/" local function concat_path(path) return table.concat(path, dir_delim)