Skip to content

Commit

Permalink
Fix issues with init file (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas committed Nov 26, 2022
1 parent e607176 commit 0c484dc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions init_coop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0c484dc

Please sign in to comment.