handle file with no extension in filechooser
This commit is contained in:
1 parent
83d910b7d3
commit
eb79e1c95c
1 file changed
+1
-1
@@ -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