mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Use love.filesystem.isFile instead of love.filesystem.exists when checking for main.lua and conf.lua on startup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user