diff options
author | wm4 <wm4@nowhere> | 2015-01-03 14:48:33 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:18 +0900 |
commit | 3f85092ffe977fa5f0e729b2924d24bbf8c4e221 (patch) | |
tree | 9b9b359032964a9fc93631b12cf8425b5d7bf6bc | |
parent | f4634e404f68605572695c3a54b9372835fc4190 (diff) | |
download | mpv-3f85092ffe977fa5f0e729b2924d24bbf8c4e221.tar.bz2 mpv-3f85092ffe977fa5f0e729b2924d24bbf8c4e221.tar.xz |
TOOLS/lua/autoload: fix behavior with network URLs
readdir() fails if the directory is an URL, so just exit instead of
letting the Lua script fail.
-rw-r--r-- | TOOLS/lua/autoload.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/TOOLS/lua/autoload.lua b/TOOLS/lua/autoload.lua index 049af868c0..433b2138d7 100644 --- a/TOOLS/lua/autoload.lua +++ b/TOOLS/lua/autoload.lua @@ -25,6 +25,9 @@ function find_and_add_entries() return end local files = mputils.readdir(dir, "files") + if files == nil then + return + end table.sort(files) if dir == "." then dir = "" |