Browse Source

directory: do not try to open "-" as it refers to stdin

This removes a silly error message.
pull/2/head
Rémi Denis-Courmont 18 years ago
parent
commit
924a703807
  1. 17
      modules/access/directory.c

17
modules/access/directory.c

@ -143,7 +143,22 @@ static int Open( vlc_object_t *p_this )
if( !p_access->psz_path )
return VLC_EGENERIC;
DIR *handle = utf8_opendir (p_access->psz_path);
DIR *handle;
if (strcmp (p_access->psz_path, "-"))
handle = utf8_opendir (p_access->psz_path);
else
{
#if 0 /* This won't work yet, it generates paths like "-/music.ogg".
* We'd need to use openat() here and in the file access... */
int fd = dup (0);
handle = fdopendir (fd);
if (handle == NULL)
close (fd);
#else
return VLC_EGENERIC;
#endif
}
if (handle == NULL)
return VLC_EGENERIC;

Loading…
Cancel
Save