mirror of https://code.videolan.org/videolan/vlc
Use vlc_openat, fix support for non-UTF-8 systems
This commit is contained in:
parent
37ae6248dd
commit
951dd377d0
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue