mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
f4634e404f
commit
3f85092ffe
|
@ -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 = ""
|
||||
|
|
Loading…
Reference in New Issue