[chore] Show FileManager in case of showReaderCoroutine failure

Same as https://github.com/koreader/koreader/pull/2956.

Fixes https://github.com/koreader/koreader/issues/4928.
This commit is contained in:
Frans de Jonge
2019-04-16 17:54:02 +02:00
committed by Qingping Hou
parent 39b48d56c0
commit 8882cdf0c5

View File

@@ -478,7 +478,10 @@ function ReaderUI:showReaderCoroutine(file, provider)
if err ~= nil or ok == false then
io.stderr:write('[!] doShowReader coroutine crashed:\n')
io.stderr:write(debug.traceback(co, err, 1))
UIManager:quit()
UIManager:show(InfoMessage:new{
text = _("No reader engine for this file or invalid file.")
})
self:showFileManager()
end
end)
end