Commit 4eae96de authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

lua: do not probe directories as playlist

Directories can never be handled by Lua playlist parsers; there are no
Lua functions to even handle that case at all. It is not clear that
there even be a point in doing so. So save time by skipping directories
altogether.

This also works around the problem that URL-based Lua scripts would
match its own self recursively.
parent 1664bf2d
......@@ -276,8 +276,11 @@ static int ReadDir(stream_t *s, input_item_node_t *node)
int Import_LuaPlaylist(vlc_object_t *obj)
{
stream_t *s = (stream_t *)obj;
struct vlclua_playlist *sys = malloc(sizeof (*sys));
if( !vlc_stream_Control( s->p_source, STREAM_IS_DIRECTORY ) )
return VLC_EGENERIC;
struct vlclua_playlist *sys = malloc(sizeof (*sys));
if (unlikely(sys == NULL))
return VLC_ENOMEM;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment