Use love.filesystem.isFile instead of love.filesystem.exists when checking for main.lua and conf.lua on startup

This commit is contained in:
Alex Szpakowski
2014-04-02 22:16:27 -03:00
parent 606c9b8fb1
commit 9dd3f70988
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -279,7 +279,7 @@ function love.boot()
-- before the save directory (the identity should be appended.)
pcall(love.filesystem.setIdentity, identity, true)
if can_has_game and not (love.filesystem.exists("main.lua") or love.filesystem.exists("conf.lua")) then
if can_has_game and not (love.filesystem.isFile("main.lua") or love.filesystem.isFile("conf.lua")) then
no_game_code = true
end
@@ -335,7 +335,7 @@ function love.init()
}
-- If config file exists, load it and allow it to update config table.
if not love.conf and love.filesystem and love.filesystem.exists("conf.lua") then
if not love.conf and love.filesystem and love.filesystem.isFile("conf.lua") then
require("conf")
end
@@ -416,7 +416,7 @@ function love.init()
if love.filesystem then
love.filesystem.setIdentity(c.identity or love.filesystem.getIdentity(), c.appendidentity)
if love.filesystem.exists("main.lua") then
if love.filesystem.isFile("main.lua") then
require("main")
end
end