mirror of https://github.com/mpv-player/mpv
demux_playlist: skip hidden directories
The user probably doesn't want these. Conveniently, this also skips the unwanted "." and ".." entries. (This code is triggered if the input stream is a directory - and it's in demux_playlist.c because it's convenient.)
This commit is contained in:
parent
f2bba55e01
commit
15f97f05b9
|
@ -250,7 +250,7 @@ static int parse_dir(struct pl_parser *p)
|
|||
|
||||
struct dirent *ep;
|
||||
while ((ep = readdir(dp))) {
|
||||
if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
|
||||
if (ep->d_name[0] == '.')
|
||||
continue;
|
||||
MP_TARRAY_APPEND(p, files, num_files, talloc_strdup(p, ep->d_name));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue