Use vlc_openat, fix support for non-UTF-8 systems

This commit is contained in:
Rémi Denis-Courmont 2010-02-14 13:33:35 +02:00
parent 37ae6248dd
commit 951dd377d0
2 changed files with 3 additions and 4 deletions

View File

@ -316,8 +316,7 @@ block_t *DirBlock (access_t *p_access)
DIR *handle;
#ifdef HAVE_FDOPENDIR
/* TODO: ToLocale */
int fd = openat (dirfd (current->handle), entry, O_RDONLY);
int fd = vlc_openat (dirfd (current->handle), entry, O_RDONLY);
if (fd != -1)
{
handle = fdopendir (fd);

View File

@ -149,10 +149,10 @@ int Open( vlc_object_t *p_this )
else if (*end == '/' && end > path)
{
char *name = decode_URI_duplicate (end - 1);
if (name != NULL) /* TODO: ToLocale(), FD_CLOEXEC */
if (name != NULL)
{
name[0] = '.';
fd = openat (oldfd, name, O_RDONLY | O_NONBLOCK);
fd = vlc_openat (oldfd, name, O_RDONLY | O_NONBLOCK);
free (name);
}
}