mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
handle file with no extension in filechooser
This commit is contained in:
@@ -11,7 +11,7 @@ end
|
||||
|
||||
function DocumentRegistry:getProvider(file)
|
||||
-- TODO: some implementation based on mime types?
|
||||
local extension = string.lower(string.match(file, ".+%.([^.]+)"))
|
||||
local extension = string.lower(string.match(file, ".+%.([^.]+)") or "")
|
||||
for _, provider in ipairs(self.providers) do
|
||||
if extension == provider.extension then
|
||||
return provider.provider
|
||||
|
||||
Reference in New Issue
Block a user