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:
wm4 2015-07-29 00:13:48 +02:00
parent f2bba55e01
commit 15f97f05b9
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}