Skip to content

Commit 0c484dc

Browse files
authored
Fix issues with init file (#107)
1 parent e607176 commit 0c484dc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

init_coop.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ path = {}
3636

3737
-- read by the engine to determine hook folders
3838
hook = {
39-
'/schook'
39+
'/schook'
40+
, '/mods/coop/hook'
4041
}
4142

4243
-- read by the engine to determine supported protocols
@@ -180,7 +181,7 @@ local function MountAllowedContent(dir, pattern, allowedAssets)
180181
for _,entry in IoDir(dir .. pattern) do
181182
if entry != '.' and entry != '..' then
182183
local mp = StringLower(entry)
183-
if allowedAssets[mp] then
184+
if (not allowedAssets) or allowedAssets[mp] then
184185
LOG("mounting content: " .. entry)
185186
MountDirectory(dir .. "/" .. entry, '/')
186187
end
@@ -372,7 +373,7 @@ end
372373
---@param modinfo FileName
373374
---@return string|nil | false
374375
local function GetModVersion(modinfo)
375-
local handle = io.open(modinfo, 'r')
376+
local handle = io.open(modinfo, 'rb')
376377
if not handle then
377378
return false -- can't read file
378379
end

0 commit comments

Comments
 (0)