summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-03 14:48:33 +0100
committerwm4 <wm4@nowhere>2015-01-03 14:48:33 +0100
commit44c077024731a7bfb6897c3d5cb8462cdcc99e24 (patch)
tree1d684f9543703ba01c204d236f3b3e716c00b2fc
parentd5f1170679f5432375a8c2ee7629ed11fe4a94c6 (diff)
downloadmpv-44c077024731a7bfb6897c3d5cb8462cdcc99e24.tar.bz2
mpv-44c077024731a7bfb6897c3d5cb8462cdcc99e24.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.lua3
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 = ""