From 8c64b399b421ddb3f8930b4e6a28c49a6c957c12 Mon Sep 17 00:00:00 2001 From: CaptainKraft Date: Thu, 4 Jun 2020 19:48:30 -0500 Subject: [PATCH] Update deprecated love.filesystem calls --- lurker.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lurker.lua b/lurker.lua index 4cd8f0f..9200ee7 100644 --- a/lurker.lua +++ b/lurker.lua @@ -15,9 +15,17 @@ local lurker = { _version = "1.0.1" } local dir = love.filesystem.enumerate or love.filesystem.getDirectoryItems -local isdir = love.filesystem.isDirectory local time = love.timer.getTime or os.time -local lastmodified = love.filesystem.getLastModified + +local function isdir(path) + local info = love.filesystem.getInfo(path) + return info.type == "directory" +end + +local function lastmodified(path) + local info = love.filesystem.getInfo(path, "file") + return info.modtime +end local lovecallbacknames = { "update", @@ -259,4 +267,3 @@ end return lurker.init() -