-- the continue button
local continuePath = love.filesystem.getSaveDirectory().."/continue.lua"
print ("Looking for Continue in ".. continuePath)
local fileInfo = love.filesystem.getInfo(continuePath)
if fileInfo then
-- restore from auto save like this
log("Continuing...")
App.game = App.LoadGameFromFile("continue")
else
log("New Game...")
-- load new battle like this
App.game = App.LoadGameFromSenario("orcBattle")
end
The save file is there and will load fine if I remove the check.
local fileInfo = love.filesystem.getInfo("continue.lua")
You'll also need to make sure that you've set your game's identity properly in your conf.lua. If you want to make sure that getInfo checks save directory before source directory (in case you have conflicting file names), make sure appendidentity is set to false.
I think for redundancy it wouldn't be a bad idea to make a mention of it on some of the relevant function pages, like getInfo, or at least a warning on getSaveDirectory.
getSaveDirectory is mostly intended for things like using external file system code or libraries (in case the sandboxed environment of love.filesystem doesn't suit your needs), or maybe even if you want your game to open a file browser window in the desired location with love.system.openURL. As such, a proper note on how the absolute path getSaveDirectory returns won't work with the other usual love.filesystem functions might be warranted.