check if last opened file exists before opening it

This should fix #916.
This commit is contained in:
chrox
2014-10-05 14:52:37 +08:00
parent 87e9f34397
commit a197f31da7

View File

@@ -134,6 +134,9 @@ if fontmap ~= nil then
end
-- last file
local last_file = G_reader_settings:readSetting("lastfile")
if last_file and lfs.attributes(last_file, "mode") ~= "file" then
last_file = nil
end
-- load last opened file
local open_last = G_reader_settings:readSetting("open_last")
-- night mode