From 0c484dc62f2297b6eb96b8556320fd98add451ac Mon Sep 17 00:00:00 2001 From: Jip Date: Sat, 26 Nov 2022 23:43:15 +0100 Subject: [PATCH] Fix issues with init file (#107) --- init_coop.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/init_coop.lua b/init_coop.lua index 0e279f15..a3b9873a 100644 --- a/init_coop.lua +++ b/init_coop.lua @@ -36,7 +36,8 @@ path = {} -- read by the engine to determine hook folders hook = { - '/schook' + '/schook' + , '/mods/coop/hook' } -- read by the engine to determine supported protocols @@ -180,7 +181,7 @@ local function MountAllowedContent(dir, pattern, allowedAssets) for _,entry in IoDir(dir .. pattern) do if entry != '.' and entry != '..' then local mp = StringLower(entry) - if allowedAssets[mp] then + if (not allowedAssets) or allowedAssets[mp] then LOG("mounting content: " .. entry) MountDirectory(dir .. "/" .. entry, '/') end @@ -372,7 +373,7 @@ end ---@param modinfo FileName ---@return string|nil | false local function GetModVersion(modinfo) - local handle = io.open(modinfo, 'r') + local handle = io.open(modinfo, 'rb') if not handle then return false -- can't read file end