]> git.sesse.net Git - vlc/commitdiff
Use vlc_openat, fix support for non-UTF-8 systems
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 14 Feb 2010 11:33:35 +0000 (13:33 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 14 Feb 2010 11:33:35 +0000 (13:33 +0200)
modules/access/directory.c
modules/access/file.c

index a1e1eaaa22ecb61f817793818c305555ee248689..05155ff4a552e0f1a1c7a803d3ba4e4abca87add 100644 (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);
index 6672024f807c78f79fc100c228f1bc30fa83f2b7..1117dfe443bceb91f689461fb6d4e5932934ed42 100644 (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);
             }
         }