diff options
author | bitingsock <micahzech@yahoo.com> | 2015-10-17 21:26:35 -0700 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-20 12:33:57 +0200 |
commit | 0121d00478bcbf38cc88c71b40d70804b1fb1588 (patch) | |
tree | 6f421a2c7257f39bf34f35b83d4f779a243beb68 /TOOLS | |
parent | e157d005ba9817f36c68df95f9e4a2f050eb5c60 (diff) |
TOOLS/autoload: avoid throwing an error when playing e.g. youtube
Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'TOOLS')
-rw-r--r-- | TOOLS/lua/autoload.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/TOOLS/lua/autoload.lua b/TOOLS/lua/autoload.lua index 2737418dcd..0c8c9a5381 100644 --- a/TOOLS/lua/autoload.lua +++ b/TOOLS/lua/autoload.lua @@ -30,7 +30,12 @@ function add_files_at(index, files) end function get_extension(path) - return string.match(path, "%.([^%.]+)$" ) + match = string.match(path, "%.([^%.]+)$" ) + if match == nil then + return "nomatch" + else + return match + end end table.filter = function(t, iter) |