From d61fe0856df090f5ab5d297752547bd9724a9a57 Mon Sep 17 00:00:00 2001 From: Brandon Blanker Lim-it Date: Thu, 19 Jul 2018 09:10:25 +0800 Subject: [PATCH] updated for 11.0+ --- lurker.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lurker.lua b/lurker.lua index 4cd8f0f..a4e3d33 100644 --- a/lurker.lua +++ b/lurker.lua @@ -15,9 +15,9 @@ local lurker = { _version = "1.0.1" } local dir = love.filesystem.enumerate or love.filesystem.getDirectoryItems -local isdir = love.filesystem.isDirectory +local isdir = love.filesystem.getInfo local time = love.timer.getTime or os.time -local lastmodified = love.filesystem.getLastModified +local lastmodified = love.filesystem.getInfo local lovecallbacknames = { "update", @@ -62,7 +62,7 @@ function lurker.listdir(path, recursive, skipdotfiles) local t = {} for _, f in pairs(lume.map(dir(path), fullpath)) do if not skipdotfiles or not f:match("/%.[^/]*$") then - if recursive and isdir(f) then + if recursive and isdir(f, "directory") then t = lume.concat(t, lurker.listdir(f, true, true)) else table.insert(t, lume.trim(f, "/")) @@ -201,7 +201,7 @@ end function lurker.getchanged() local function fn(f) - return f:match("%.lua$") and lurker.files[f] ~= lastmodified(f) + return f:match("%.lua$") and lurker.files[f] ~= lastmodified(f).modtime end return lume.filter(lurker.listdir(lurker.path, true, true), fn) end @@ -213,7 +213,7 @@ end function lurker.resetfile(f) - lurker.files[f] = lastmodified(f) + lurker.files[f] = lastmodified(f).modtime end