mirror of
https://github.com/mpv-player/mpv
synced 2024-09-09 01:16:56 +02:00
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
d5f1170679
commit
44c0770247
@ -25,6 +25,9 @@ function find_and_add_entries()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local files = mputils.readdir(dir, "files")
|
local files = mputils.readdir(dir, "files")
|
||||||
|
if files == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
table.sort(files)
|
table.sort(files)
|
||||||
if dir == "." then
|
if dir == "." then
|
||||||
dir = ""
|
dir = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user