mirror of
https://github.com/Oreolek/ink-instead.git
synced 2024-07-08 01:24:39 +03:00
love filesystem file not found warning
This commit is contained in:
parent
11d6fd7f00
commit
233ccbede7
|
@ -6,7 +6,8 @@ local getParser = function () return require(folderOfThisFile .. 'parser') end
|
|||
local runtime = require(folderOfThisFile .. 'runtime')
|
||||
|
||||
local function read(file) -- TODO should this be here or in client code? At lease allow to pass an ink content in a string
|
||||
if love and love.filesystem and love.filesystem.read then
|
||||
if love and love.filesystem then
|
||||
if not love.filesystem.isFile(file) then error('failed to open "'..file..'"') end
|
||||
local content, size = love.filesystem.read(file)
|
||||
return content
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue