lurker
lurker copied to clipboard
Warnings under Love 11.1
LOVE - Warning: vendor/lurker.lua:65: Using deprecated function love.filesystem.isDirectory (replaced by love.filesystem.getInfo)
LOVE - Warning: vendor/lurker.lua:204: Using deprecated function love.filesystem.getLastModified (replaced by love.filesystem.getInfo)
I've patched it locally. I'll see about providing a PR soon.
Since the functions are already at the top, and have a very definite purpose, changing them is pretty easy:
local isdir = function(item) return love.filesystem.getInfo(item).type == "directory" end --love.filesystem.isDirectory
local lastmodified = function(item) return love.filesystem.getInfo(item).modtime end --love.filesystem.getLastModified
Also, the code provided by @4v0v uses size instead of modtime to determine whether a file was modified, which doesn't work in the (admittedly few) instances where the file is still the same size after modification.
Oh I understand why I had so many bugs now... Don't use my code indeed xd
I've made a PR for this. #10
I'm still currently using love 0.10.2 -- if anyone wants to add the functions @weakman54 described combined with a call to love.getVersion() to use the old functions for earlier love versions, and can test it works fine on love 11, I'd be happy to accept a pull request.