Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings under Love 11.1 #9

Open
hlship opened this issue Apr 29, 2018 · 5 comments
Open

Warnings under Love 11.1 #9

hlship opened this issue Apr 29, 2018 · 5 comments

Comments

@hlship
Copy link

hlship commented Apr 29, 2018

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)
@hlship
Copy link
Author

hlship commented May 7, 2018

I've patched it locally. I'll see about providing a PR soon.

@weakman54
Copy link

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.

@hfr4
Copy link

hfr4 commented Jun 19, 2018

Oh I understand why I had so many bugs now... Don't use my code indeed xd

@flamendless
Copy link

I've made a PR for this. #10

@rxi
Copy link
Owner

rxi commented Jul 21, 2018

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.

@rxi rxi mentioned this issue Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants