TOOLS/autoload: avoid throwing an error when playing e.g. youtube

Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
bitingsock 2015-10-17 21:26:35 -07:00 committed by wm4
parent e157d005ba
commit 0121d00478
1 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,12 @@ function add_files_at(index, files)
end end
function get_extension(path) function get_extension(path)
return string.match(path, "%.([^%.]+)$" ) match = string.match(path, "%.([^%.]+)$" )
if match == nil then
return "nomatch"
else
return match
end
end end
table.filter = function(t, iter) table.filter = function(t, iter)