Commit 951dd377 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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

parent 37ae6248
...@@ -316,8 +316,7 @@ block_t *DirBlock (access_t *p_access) ...@@ -316,8 +316,7 @@ block_t *DirBlock (access_t *p_access)
DIR *handle; DIR *handle;
#ifdef HAVE_FDOPENDIR #ifdef HAVE_FDOPENDIR
/* TODO: ToLocale */ int fd = vlc_openat (dirfd (current->handle), entry, O_RDONLY);
int fd = openat (dirfd (current->handle), entry, O_RDONLY);
if (fd != -1) if (fd != -1)
{ {
handle = fdopendir (fd); handle = fdopendir (fd);
......
...@@ -149,10 +149,10 @@ int Open( vlc_object_t *p_this ) ...@@ -149,10 +149,10 @@ int Open( vlc_object_t *p_this )
else if (*end == '/' && end > path) else if (*end == '/' && end > path)
{ {
char *name = decode_URI_duplicate (end - 1); char *name = decode_URI_duplicate (end - 1);
if (name != NULL) /* TODO: ToLocale(), FD_CLOEXEC */ if (name != NULL)
{ {
name[0] = '.'; name[0] = '.';
fd = openat (oldfd, name, O_RDONLY | O_NONBLOCK); fd = vlc_openat (oldfd, name, O_RDONLY | O_NONBLOCK);
free (name); free (name);
} }
} }
......
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