mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -83,7 +83,8 @@ function Font:_readList(target, dir, effective_dir)
|
||||
self:_readList(target, dir.."/"..f, effective_dir..f.."/")
|
||||
else
|
||||
local file_type = string.lower(string.match(f, ".+%.([^.]+)") or "")
|
||||
if file_type == "ttf" or file_type == "cff" or file_type == "otf" then
|
||||
if file_type == "ttf" or file_type == "ttc"
|
||||
or file_type == "cff" or file_type == "otf" then
|
||||
table.insert(target, effective_dir..f)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,8 +39,9 @@ function FileChooser:genItemTableFromPath(path)
|
||||
local files = {}
|
||||
|
||||
-- lfs.dir directory without permission will give error
|
||||
if pcall(lfs.dir, self.path) then
|
||||
for f in lfs.dir(self.path) do
|
||||
local ok, iter, dir_obj = pcall(lfs.dir, self.path)
|
||||
if ok then
|
||||
for f in iter, dir_obj do
|
||||
if self.show_hidden or not string.match(f, "^%.[^.]") then
|
||||
local filename = self.path.."/"..f
|
||||
local filemode = lfs.attributes(filename, "mode")
|
||||
|
||||
@@ -203,11 +203,6 @@ function VirtualKeyboard:init()
|
||||
}
|
||||
}
|
||||
self:initLayout(self.layout)
|
||||
if GLOBAL_INPUT_VALUE then
|
||||
for i = 1, string.len(GLOBAL_INPUT_VALUE) do
|
||||
self:addChar(string.sub(GLOBAL_INPUT_VALUE,i,i))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function VirtualKeyboard:initLayout(layout)
|
||||
|
||||
Reference in New Issue
Block a user