mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
[fix] Don't crash when trying to go to deleted folders (#4110)
This commit is contained in:
@@ -47,6 +47,7 @@ local function restoreScreenMode()
|
||||
end
|
||||
|
||||
local function truncatePath(text)
|
||||
if not text then return "" end
|
||||
local screen_width = Screen:getWidth()
|
||||
local face = Font:getFace("xx_smallinfofont")
|
||||
-- we want to truncate text on the left, so work with the reverse of text (which is fine as we don't use kerning)
|
||||
|
||||
@@ -21,6 +21,7 @@ function filemanagerutil.getDefaultDir()
|
||||
end
|
||||
|
||||
function filemanagerutil.abbreviate(path)
|
||||
if not path then return "" end
|
||||
local home_dir_name = G_reader_settings:readSetting("home_dir_display_name")
|
||||
if home_dir_name ~= nil then
|
||||
local home_dir = G_reader_settings:readSetting("home_dir") or filemanagerutil.getDefaultDir()
|
||||
|
||||
Reference in New Issue
Block a user